aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/numeric
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-05-03 12:28:29 +0200
committerBenoit Daloze <eregontp@gmail.com>2020-05-03 12:28:29 +0200
commit5aaa75e7c1f4b7912c10ffdcb1cac581e20eda39 (patch)
treee1694f5a4a5558884b1b8f3890b186793e5e982f /spec/ruby/core/numeric
parentf646d20aaeb8f02bcd3d0c5c3f5a372da654502a (diff)
downloadruby-5aaa75e7c1f4b7912c10ffdcb1cac581e20eda39.tar.gz
Update to ruby/spec@032ee74
Diffstat (limited to 'spec/ruby/core/numeric')
-rw-r--r--spec/ruby/core/numeric/integer_spec.rb2
-rw-r--r--spec/ruby/core/numeric/negative_spec.rb4
-rw-r--r--spec/ruby/core/numeric/positive_spec.rb4
-rw-r--r--spec/ruby/core/numeric/real_spec.rb2
-rw-r--r--spec/ruby/core/numeric/zero_spec.rb4
5 files changed, 8 insertions, 8 deletions
diff --git a/spec/ruby/core/numeric/integer_spec.rb b/spec/ruby/core/numeric/integer_spec.rb
index 5d4bf00360..adbac4d7aa 100644
--- a/spec/ruby/core/numeric/integer_spec.rb
+++ b/spec/ruby/core/numeric/integer_spec.rb
@@ -3,6 +3,6 @@ require_relative 'fixtures/classes'
describe "Numeric#integer?" do
it "returns false" do
- NumericSpecs::Subclass.new.integer?.should == false
+ NumericSpecs::Subclass.new.should_not.integer?
end
end
diff --git a/spec/ruby/core/numeric/negative_spec.rb b/spec/ruby/core/numeric/negative_spec.rb
index da464a9094..9c6f95fd87 100644
--- a/spec/ruby/core/numeric/negative_spec.rb
+++ b/spec/ruby/core/numeric/negative_spec.rb
@@ -31,11 +31,11 @@ describe "Numeric#negative?" do
it "returns true if self is less than 0" do
@obj.should_receive(:<).with(0).and_return(true)
- @obj.negative?.should == true
+ @obj.should.negative?
end
it "returns false if self is greater than 0" do
@obj.should_receive(:<).with(0).and_return(false)
- @obj.negative?.should == false
+ @obj.should_not.negative?
end
end
diff --git a/spec/ruby/core/numeric/positive_spec.rb b/spec/ruby/core/numeric/positive_spec.rb
index 8f98fbfa26..3b831b4d34 100644
--- a/spec/ruby/core/numeric/positive_spec.rb
+++ b/spec/ruby/core/numeric/positive_spec.rb
@@ -31,11 +31,11 @@ describe "Numeric#positive?" do
it "returns true if self is greater than 0" do
@obj.should_receive(:>).with(0).and_return(true)
- @obj.positive?.should == true
+ @obj.should.positive?
end
it "returns false if self is less than 0" do
@obj.should_receive(:>).with(0).and_return(false)
- @obj.positive?.should == false
+ @obj.should_not.positive?
end
end
diff --git a/spec/ruby/core/numeric/real_spec.rb b/spec/ruby/core/numeric/real_spec.rb
index caa8dcec6d..2d2499bcce 100644
--- a/spec/ruby/core/numeric/real_spec.rb
+++ b/spec/ruby/core/numeric/real_spec.rb
@@ -32,6 +32,6 @@ end
describe "Numeric#real?" do
it "returns true" do
- NumericSpecs::Subclass.new.real?.should == true
+ NumericSpecs::Subclass.new.should.real?
end
end
diff --git a/spec/ruby/core/numeric/zero_spec.rb b/spec/ruby/core/numeric/zero_spec.rb
index 9de71d1dc9..0fb7619bcd 100644
--- a/spec/ruby/core/numeric/zero_spec.rb
+++ b/spec/ruby/core/numeric/zero_spec.rb
@@ -8,11 +8,11 @@ describe "Numeric#zero?" do
it "returns true if self is 0" do
@obj.should_receive(:==).with(0).and_return(true)
- @obj.zero?.should == true
+ @obj.should.zero?
end
it "returns false if self is not 0" do
@obj.should_receive(:==).with(0).and_return(false)
- @obj.zero?.should == false
+ @obj.should_not.zero?
end
end