Skip to content

Commit

Permalink
Remove duplicate DefaultReceiverTest
Browse files Browse the repository at this point in the history
This was accidentally copy & pasted in this commit [1] as part of #726.
The canonical version is in `test/unit/default_receiver_test.rb`.

The presence of the duplicate version was causing these warnings in the
`test:units` rake task:

    test/unit/default_receiver_test.rb:9: warning: method redefined; discarding old test_mocks_returns_mock
    test/unit/any_instance_receiver_test.rb:44: warning: previous definition of test_mocks_returns_mock was here

[1]: 8da6a53
  • Loading branch information
floehopper committed Jan 3, 2025
1 parent 9929ee0 commit 39d9995
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions test/unit/any_instance_receiver_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,3 @@ def test_mocks_returns_mocks_for_class_and_its_superclasses
assert_equal [:mocha, :parent_mocha, :grandparent_mocha], receiver.mocks
end
end

class DefaultReceiverTest < Mocha::TestCase
include Mocha

def test_mocks_returns_mock
mock = :mocha
receiver = DefaultReceiver.new(mock)
assert_equal [:mocha], receiver.mocks
end
end

0 comments on commit 39d9995

Please sign in to comment.