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 | |
parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) | |
download | ruby-5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0.tar.gz |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/comparable')
-rw-r--r-- | spec/ruby/core/comparable/clamp_spec.rb | 8 | ||||
-rw-r--r-- | spec/ruby/core/comparable/equal_value_spec.rb | 8 | ||||
-rw-r--r-- | spec/ruby/core/comparable/gt_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/comparable/gte_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/comparable/lt_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/comparable/lte_spec.rb | 2 |
6 files changed, 12 insertions, 12 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 diff --git a/spec/ruby/core/comparable/equal_value_spec.rb b/spec/ruby/core/comparable/equal_value_spec.rb index 53c83aa2d3..ddcc03cb41 100644 --- a/spec/ruby/core/comparable/equal_value_spec.rb +++ b/spec/ruby/core/comparable/equal_value_spec.rb @@ -49,7 +49,7 @@ describe "Comparable#==" do end it "raises an ArgumentError" do - lambda { (a == b) }.should raise_error(ArgumentError) + -> { (a == b) }.should raise_error(ArgumentError) end end @@ -60,7 +60,7 @@ describe "Comparable#==" do end it "lets it go through" do - lambda { (a == b) }.should raise_error(StandardError) + -> { (a == b) }.should raise_error(StandardError) end end @@ -71,13 +71,13 @@ describe "Comparable#==" do end it "lets it go through" do - lambda { (a == b) }.should raise_error(TypeError) + -> { (a == b) }.should raise_error(TypeError) end end it "lets it go through if it is not a StandardError" do a.should_receive(:<=>).once.and_raise(Exception) - lambda { (a == b) }.should raise_error(Exception) + -> { (a == b) }.should raise_error(Exception) end end diff --git a/spec/ruby/core/comparable/gt_spec.rb b/spec/ruby/core/comparable/gt_spec.rb index 6dd661bbfa..150e653dc7 100644 --- a/spec/ruby/core/comparable/gt_spec.rb +++ b/spec/ruby/core/comparable/gt_spec.rb @@ -38,6 +38,6 @@ describe "Comparable#>" do b = ComparableSpecs::Weird.new(20) a.should_receive(:<=>).any_number_of_times.and_return(nil) - lambda { (a > b) }.should raise_error(ArgumentError) + -> { (a > b) }.should raise_error(ArgumentError) end end diff --git a/spec/ruby/core/comparable/gte_spec.rb b/spec/ruby/core/comparable/gte_spec.rb index cdaeb60843..328f58c66c 100644 --- a/spec/ruby/core/comparable/gte_spec.rb +++ b/spec/ruby/core/comparable/gte_spec.rb @@ -42,6 +42,6 @@ describe "Comparable#>=" do b = ComparableSpecs::Weird.new(20) a.should_receive(:<=>).any_number_of_times.and_return(nil) - lambda { (a >= b) }.should raise_error(ArgumentError) + -> { (a >= b) }.should raise_error(ArgumentError) end end diff --git a/spec/ruby/core/comparable/lt_spec.rb b/spec/ruby/core/comparable/lt_spec.rb index 02f77dba50..4db92719e2 100644 --- a/spec/ruby/core/comparable/lt_spec.rb +++ b/spec/ruby/core/comparable/lt_spec.rb @@ -38,6 +38,6 @@ describe "Comparable#<" do b = ComparableSpecs::Weird.new(20) a.should_receive(:<=>).any_number_of_times.and_return(nil) - lambda { (a < b) }.should raise_error(ArgumentError) + -> { (a < b) }.should raise_error(ArgumentError) end end diff --git a/spec/ruby/core/comparable/lte_spec.rb b/spec/ruby/core/comparable/lte_spec.rb index baf2c57229..b5cb9cc4e7 100644 --- a/spec/ruby/core/comparable/lte_spec.rb +++ b/spec/ruby/core/comparable/lte_spec.rb @@ -41,6 +41,6 @@ describe "Comparable#<=" do b = ComparableSpecs::Weird.new(20) a.should_receive(:<=>).any_number_of_times.and_return(nil) - lambda { (a <= b) }.should raise_error(ArgumentError) + -> { (a <= b) }.should raise_error(ArgumentError) end end |