Skip to content

Commit

Permalink
Fix issue in test: raise_error had hidden an error
Browse files Browse the repository at this point in the history
  • Loading branch information
olleolleolle authored and pitr-ch committed Feb 21, 2018
1 parent 7f84d02 commit c37e70f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/concurrent/atomic/atomic_fixnum_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
it 'raises an exception if the initial value is not a Fixnum' do
expect {
described_class.new(10.01)
}.to raise_error
}.to raise_error(ArgumentError)
end
end

Expand Down Expand Up @@ -46,7 +46,7 @@
atomic = described_class.new(0)
expect {
atomic.value = 'foo'
}.to raise_error
}.to raise_error(ArgumentError)
end
end

Expand Down Expand Up @@ -161,14 +161,14 @@ module Concurrent

it 'raises an exception if the initial value is too big' do
expect {
described_class.new(described_class::MAX_VALUE + 1)
}.to raise_error
described_class.new(Utility::NativeInteger::MAX_VALUE + 1)
}.to raise_error(RangeError)
end

it 'raises an exception if the initial value is too small' do
expect {
described_class.new(described_class::MIN_VALUE - 1)
}.to raise_error
described_class.new(Utility::NativeInteger::MIN_VALUE - 1)
}.to raise_error(RangeError)
end
end

Expand Down

0 comments on commit c37e70f

Please sign in to comment.