diff options
Diffstat (limited to 'spec/ruby/core/range/new_spec.rb')
-rw-r--r-- | spec/ruby/core/range/new_spec.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/spec/ruby/core/range/new_spec.rb b/spec/ruby/core/range/new_spec.rb index 9ed2b65d5a..be10ff244e 100644 --- a/spec/ruby/core/range/new_spec.rb +++ b/spec/ruby/core/range/new_spec.rb @@ -33,14 +33,12 @@ describe "Range.new" do -> { Range.new(a, b) }.should raise_error(ArgumentError) end - ruby_version_is "2.5" do - it "does not rescue exception raised in #<=> when compares the given start and end" do - b = mock('a') - a = mock('b') - a.should_receive(:<=>).with(b).and_raise(RangeSpecs::ComparisonError) + it "does not rescue exception raised in #<=> when compares the given start and end" do + b = mock('a') + a = mock('b') + a.should_receive(:<=>).with(b).and_raise(RangeSpecs::ComparisonError) - -> { Range.new(a, b) }.should raise_error(RangeSpecs::ComparisonError) - end + -> { Range.new(a, b) }.should raise_error(RangeSpecs::ComparisonError) end describe "beginless/endless range" do |