diff options
Diffstat (limited to 'spec/ruby/library/datetime/hour_spec.rb')
| -rw-r--r-- | spec/ruby/library/datetime/hour_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/library/datetime/hour_spec.rb b/spec/ruby/library/datetime/hour_spec.rb index 8efd5f92f0..383a85fe60 100644 --- a/spec/ruby/library/datetime/hour_spec.rb +++ b/spec/ruby/library/datetime/hour_spec.rb @@ -15,23 +15,23 @@ describe "DateTime#hour" do end it "raises an error for Rational" do - -> { new_datetime(hour: 1 + Rational(1,2)) }.should raise_error(ArgumentError) + -> { new_datetime(hour: 1 + Rational(1,2)) }.should.raise(ArgumentError) end it "raises an error for Float" do - -> { new_datetime(hour: 1.5).hour }.should raise_error(ArgumentError) + -> { new_datetime(hour: 1.5).hour }.should.raise(ArgumentError) end it "raises an error for Rational" do - -> { new_datetime(day: 1 + Rational(1,2)) }.should raise_error(ArgumentError) + -> { new_datetime(day: 1 + Rational(1,2)) }.should.raise(ArgumentError) end it "raises an error, when the hour is smaller than -24" do - -> { new_datetime(hour: -25) }.should raise_error(ArgumentError) + -> { new_datetime(hour: -25) }.should.raise(ArgumentError) end it "raises an error, when the hour is larger than 24" do - -> { new_datetime(hour: 25) }.should raise_error(ArgumentError) + -> { new_datetime(hour: 25) }.should.raise(ArgumentError) end it "raises an error for hour fractions smaller than -24" do |
