Skip to content

Commit

Permalink
In ruby 2.4, Bignum and Fixnum have been merged to Integer. Fixes fai…
Browse files Browse the repository at this point in the history
…ling tests. (tenderlove)

[git-p4: depot-paths = "//src/minitest/dev/": change = 10819]
  • Loading branch information
zenspider committed Jul 15, 2016
1 parent 5424c55 commit fc96854
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/minitest/test_minitest_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,11 @@ def assert_triggered expected = "blah", klass = Minitest::Assertion
it "needs to verify instances of a class" do
42.wont_be_instance_of(String).must_equal false

assert_triggered "Expected 42 to not be an instance of Fixnum." do
assert_triggered "Expected 42 to not be an instance of #{Fixnum.name}." do
42.wont_be_instance_of Fixnum
end

assert_triggered "msg.\nExpected 42 to not be an instance of Fixnum." do
assert_triggered "msg.\nExpected 42 to not be an instance of #{Fixnum.name}." do
42.wont_be_instance_of Fixnum, "msg"
end
end
Expand All @@ -348,11 +348,11 @@ def assert_triggered expected = "blah", klass = Minitest::Assertion
(6 * 7).must_be_kind_of(Fixnum).must_equal true
(6 * 7).must_be_kind_of(Numeric).must_equal true

assert_triggered "Expected 42 to be a kind of String, not Fixnum." do
assert_triggered "Expected 42 to be a kind of String, not #{Fixnum.name}." do
(6 * 7).must_be_kind_of String
end

assert_triggered "msg.\nExpected 42 to be a kind of String, not Fixnum." do
assert_triggered "msg.\nExpected 42 to be a kind of String, not #{Fixnum.name}." do
(6 * 7).must_be_kind_of String, "msg"
end

Expand Down Expand Up @@ -521,7 +521,7 @@ def assert_triggered expected = "blah", klass = Minitest::Assertion
it "needs to verify types of objects" do
(6 * 7).must_be_instance_of(Fixnum).must_equal true

exp = "Expected 42 to be an instance of String, not Fixnum."
exp = "Expected 42 to be an instance of String, not #{Fixnum.name}."

assert_triggered exp do
(6 * 7).must_be_instance_of String
Expand Down Expand Up @@ -565,11 +565,11 @@ def assert_triggered expected = "blah", klass = Minitest::Assertion
it "needs to verify using respond_to" do
42.must_respond_to(:+).must_equal true

assert_triggered "Expected 42 (Fixnum) to respond to #clear." do
assert_triggered "Expected 42 (#{Fixnum.name}) to respond to #clear." do
42.must_respond_to :clear
end

assert_triggered "msg.\nExpected 42 (Fixnum) to respond to #clear." do
assert_triggered "msg.\nExpected 42 (#{Fixnum.name}) to respond to #clear." do
42.must_respond_to :clear, "msg"
end
end
Expand Down

0 comments on commit fc96854

Please sign in to comment.