summaryrefslogtreecommitdiff
path: root/spec/ruby/library/datetime/shared/sec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <[email protected]>2019-07-27 12:40:09 +0200
committerBenoit Daloze <[email protected]>2019-07-27 12:40:09 +0200
commit5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch)
tree05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/library/datetime/shared/sec.rb
parenta06301b103371b0b7da8eaca26ba744961769f99 (diff)
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/library/datetime/shared/sec.rb')
-rw-r--r--spec/ruby/library/datetime/shared/sec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/library/datetime/shared/sec.rb b/spec/ruby/library/datetime/shared/sec.rb
index 68e8af8e40..60009213aa 100644
--- a/spec/ruby/library/datetime/shared/sec.rb
+++ b/spec/ruby/library/datetime/shared/sec.rb
@@ -23,19 +23,19 @@ describe :datetime_sec, shared: true do
end
it "raises an error when minute is given as a rational" do
- lambda { new_datetime(minute: 5 + Rational(1,2)) }.should raise_error(ArgumentError)
+ -> { new_datetime(minute: 5 + Rational(1,2)) }.should raise_error(ArgumentError)
end
it "raises an error, when the second is smaller than -60" do
- lambda { new_datetime(second: -61) }.should raise_error(ArgumentError)
+ -> { new_datetime(second: -61) }.should raise_error(ArgumentError)
end
it "raises an error, when the second is greater or equal than 60" do
- lambda { new_datetime(second: 60) }.should raise_error(ArgumentError)
+ -> { new_datetime(second: 60) }.should raise_error(ArgumentError)
end
it "raises an error for second fractions smaller than -60" do
- lambda { new_datetime(second: -60 - Rational(1,2))}.should(
+ -> { new_datetime(second: -60 - Rational(1,2))}.should(
raise_error(ArgumentError))
end