diff options
Diffstat (limited to 'spec/ruby/library/date/shared/commercial.rb')
| -rw-r--r-- | spec/ruby/library/date/shared/commercial.rb | 18 |
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 |
