Skip to content

Commit f01086d

Browse files
committed
fix missing new lines in mvar_spec.rb
1 parent 084df29 commit f01086d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spec/concurrent/mvar_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,25 +69,30 @@ def dereferenceable_subject(value, opts = {})
6969
end
7070

7171
context 'when a block is given' do
72+
7273
it 'yields current value to the block and puts back value' do
7374
m = MVar.new(14)
7475
expect { |b| m.take(&b) }.to yield_with_args(14)
7576
expect(m.take).to eq(14)
7677
end
78+
7779
it 'puts back value even if an exception is raised' do
7880
m = MVar.new(14)
7981
expect { m.take { fail 'boom!' } }.to raise_error('boom!')
8082
expect(m.take).to eq(14)
8183
end
84+
8285
it 'returns the returned value of the block' do
8386
m = MVar.new(14)
8487
expect(m.take{2}).to eq(2)
8588
expect(m.take).to eq(14)
8689
end
90+
8791
it 'returns TIMEOUT on timeout on an empty MVar' do
8892
m = MVar.new
8993
expect(m.take(0.1){}).to eq MVar::TIMEOUT
9094
end
95+
9196
end
9297

9398
end

0 commit comments

Comments
 (0)