mirror of https://github.com/rails/rails
Remove warning remeving the method before redefining
We need to test if the same method defined more than once only register one subscriber for it. We can safelly remove because the method body is the same and Subscriber use method_added hook for register the subscriber.
This commit is contained in:
parent
8b36471501
commit
2fdddcee6f
|
@ -23,6 +23,7 @@ end
|
|||
|
||||
# Monkey patch subscriber to test that only one subscriber per method is added.
|
||||
class TestSubscriber
|
||||
remove_method :open_party
|
||||
def open_party(event)
|
||||
events << event
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue