diff options
| author | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
|---|---|---|
| committer | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
| commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
| tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/core/comparable/clamp_spec.rb | |
| parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) | |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/comparable/clamp_spec.rb')
| -rw-r--r-- | spec/ruby/core/comparable/clamp_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/comparable/clamp_spec.rb b/spec/ruby/core/comparable/clamp_spec.rb index d3f1022499..6d216220d4 100644 --- a/spec/ruby/core/comparable/clamp_spec.rb +++ b/spec/ruby/core/comparable/clamp_spec.rb @@ -4,8 +4,8 @@ require_relative 'fixtures/classes' describe 'Comparable#clamp' do it 'raises an Argument error unless given 2 parameters' do c = ComparableSpecs::Weird.new(0) - lambda { c.clamp(c) }.should raise_error(ArgumentError) - lambda { c.clamp(c, c, c) }.should raise_error(ArgumentError) + -> { c.clamp(c) }.should raise_error(ArgumentError) + -> { c.clamp(c, c, c) }.should raise_error(ArgumentError) end it 'raises an Argument error unless the 2 parameters are correctly ordered' do @@ -13,9 +13,9 @@ describe 'Comparable#clamp' do two = ComparableSpecs::WithOnlyCompareDefined.new(2) c = ComparableSpecs::Weird.new(3) - lambda { c.clamp(two, one) }.should raise_error(ArgumentError) + -> { c.clamp(two, one) }.should raise_error(ArgumentError) one.should_receive(:<=>).any_number_of_times.and_return(nil) - lambda { c.clamp(one, two) }.should raise_error(ArgumentError) + -> { c.clamp(one, two) }.should raise_error(ArgumentError) end it 'returns self if within the given parameters' do |
