diff options
author | Benoit Daloze <[email protected]> | 2020-05-03 12:28:29 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2020-05-03 12:28:29 +0200 |
commit | 5aaa75e7c1f4b7912c10ffdcb1cac581e20eda39 (patch) | |
tree | e1694f5a4a5558884b1b8f3890b186793e5e982f /spec/ruby/core/float | |
parent | f646d20aaeb8f02bcd3d0c5c3f5a372da654502a (diff) |
Update to ruby/spec@032ee74
Diffstat (limited to 'spec/ruby/core/float')
-rw-r--r-- | spec/ruby/core/float/finite_spec.rb | 8 | ||||
-rw-r--r-- | spec/ruby/core/float/nan_spec.rb | 6 | ||||
-rw-r--r-- | spec/ruby/core/float/next_float_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/float/prev_float_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/float/uminus_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/float/zero_spec.rb | 6 |
6 files changed, 13 insertions, 13 deletions
diff --git a/spec/ruby/core/float/finite_spec.rb b/spec/ruby/core/float/finite_spec.rb index c5fb3df849..d839b30e32 100644 --- a/spec/ruby/core/float/finite_spec.rb +++ b/spec/ruby/core/float/finite_spec.rb @@ -2,18 +2,18 @@ require_relative '../../spec_helper' describe "Float#finite?" do it "returns true for finite values" do - 3.14159.finite?.should == true + 3.14159.should.finite? end it "returns false for positive infinity" do - infinity_value.finite?.should == false + infinity_value.should_not.finite? end it "returns false for negative infinity" do - (-infinity_value).finite?.should == false + (-infinity_value).should_not.finite? end it "returns false for NaN" do - nan_value.finite?.should == false + nan_value.should_not.finite? end end diff --git a/spec/ruby/core/float/nan_spec.rb b/spec/ruby/core/float/nan_spec.rb index d09d25153c..c1043ef21b 100644 --- a/spec/ruby/core/float/nan_spec.rb +++ b/spec/ruby/core/float/nan_spec.rb @@ -2,8 +2,8 @@ require_relative '../../spec_helper' describe "Float#nan?" do it "returns true if self is not a valid IEEE floating-point number" do - 0.0.nan?.should == false - -1.5.nan?.should == false - nan_value.nan?.should == true + 0.0.should_not.nan? + -1.5.should_not.nan? + nan_value.should.nan? end end diff --git a/spec/ruby/core/float/next_float_spec.rb b/spec/ruby/core/float/next_float_spec.rb index 2f0eff605a..29e2d31146 100644 --- a/spec/ruby/core/float/next_float_spec.rb +++ b/spec/ruby/core/float/next_float_spec.rb @@ -44,6 +44,6 @@ describe "Float#next_float" do end it "returns NAN if NAN was the receiver" do - Float::NAN.next_float.nan?.should == true + Float::NAN.next_float.should.nan? end end diff --git a/spec/ruby/core/float/prev_float_spec.rb b/spec/ruby/core/float/prev_float_spec.rb index 40fcc25a6d..5e50269da7 100644 --- a/spec/ruby/core/float/prev_float_spec.rb +++ b/spec/ruby/core/float/prev_float_spec.rb @@ -44,6 +44,6 @@ describe "Float#prev_float" do end it "returns NAN if NAN was the receiver" do - Float::NAN.prev_float.nan?.should == true + Float::NAN.prev_float.should.nan? end end diff --git a/spec/ruby/core/float/uminus_spec.rb b/spec/ruby/core/float/uminus_spec.rb index e676a26ada..57bae0fb4b 100644 --- a/spec/ruby/core/float/uminus_spec.rb +++ b/spec/ruby/core/float/uminus_spec.rb @@ -23,6 +23,6 @@ describe "Float#-@" do end it "returns NaN for NaN" do - nan_value.send(:-@).nan?.should == true + nan_value.send(:-@).should.nan? end end diff --git a/spec/ruby/core/float/zero_spec.rb b/spec/ruby/core/float/zero_spec.rb index e70edc422a..1f3de27793 100644 --- a/spec/ruby/core/float/zero_spec.rb +++ b/spec/ruby/core/float/zero_spec.rb @@ -2,8 +2,8 @@ require_relative '../../spec_helper' describe "Float#zero?" do it "returns true if self is 0.0" do - 0.0.zero?.should == true - 1.0.zero?.should == false - -1.0.zero?.should == false + 0.0.should.zero? + 1.0.should_not.zero? + -1.0.should_not.zero? end end |