summaryrefslogtreecommitdiff
path: root/spec/ruby/library/date/shared/commercial.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-07-27 12:40:09 +0200
committerBenoit Daloze <eregontp@gmail.com>2019-07-27 12:40:09 +0200
commit5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch)
tree05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/library/date/shared/commercial.rb
parenta06301b103371b0b7da8eaca26ba744961769f99 (diff)
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/library/date/shared/commercial.rb')
-rw-r--r--spec/ruby/library/date/shared/commercial.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/ruby/library/date/shared/commercial.rb b/spec/ruby/library/date/shared/commercial.rb
index 354a5d5cd0..39c9af47b6 100644
--- a/spec/ruby/library/date/shared/commercial.rb
+++ b/spec/ruby/library/date/shared/commercial.rb
@@ -25,15 +25,15 @@ describe :date_commercial, shared: true do
end
it "creates only Date objects for valid weeks" do
- lambda { Date.send(@method, 2004, 53, 1) }.should_not raise_error(ArgumentError)
- lambda { Date.send(@method, 2004, 53, 0) }.should raise_error(ArgumentError)
- lambda { Date.send(@method, 2004, 53, 8) }.should raise_error(ArgumentError)
- lambda { Date.send(@method, 2004, 54, 1) }.should raise_error(ArgumentError)
- lambda { Date.send(@method, 2004, 0, 1) }.should raise_error(ArgumentError)
+ -> { Date.send(@method, 2004, 53, 1) }.should_not raise_error(ArgumentError)
+ -> { Date.send(@method, 2004, 53, 0) }.should raise_error(ArgumentError)
+ -> { Date.send(@method, 2004, 53, 8) }.should raise_error(ArgumentError)
+ -> { Date.send(@method, 2004, 54, 1) }.should raise_error(ArgumentError)
+ -> { Date.send(@method, 2004, 0, 1) }.should raise_error(ArgumentError)
- lambda { Date.send(@method, 2003, 52, 1) }.should_not raise_error(ArgumentError)
- lambda { Date.send(@method, 2003, 53, 1) }.should raise_error(ArgumentError)
- lambda { Date.send(@method, 2003, 52, 0) }.should raise_error(ArgumentError)
- lambda { Date.send(@method, 2003, 52, 8) }.should raise_error(ArgumentError)
+ -> { Date.send(@method, 2003, 52, 1) }.should_not raise_error(ArgumentError)
+ -> { Date.send(@method, 2003, 53, 1) }.should raise_error(ArgumentError)
+ -> { Date.send(@method, 2003, 52, 0) }.should raise_error(ArgumentError)
+ -> { Date.send(@method, 2003, 52, 8) }.should raise_error(ArgumentError)
end
end