method
remove_stub
1.2.8 -
Show latest stable
-
0 notes -
Class: Spec::Mocks::Proxy
- 1.1.4
- 1.1.12
- 1.2.0
- 1.2.8 (0)
- 1.3.0 (0)
- 1.3.1 (0)
- What's this?
remove_stub(message)
public
Hide source
# File lib/spec/mocks/proxy.rb, line 65 def remove_stub(message) message = message.to_sym if stub_to_remove = @stubs.detect { |s| s.matches_name?(message) } reset_proxied_method(message) @stubs.delete(stub_to_remove) else raise MockExpectationError, "The method `#{message}` was not stubbed or was already unstubbed" end end