# File lib/rspec/mocks/any_instance/recorder.rb, line 71 def unstub(method_name) unless @observed_methods.include?(method_name.to_sym) raise RSpec::Mocks::MockExpectationError, "The method `#{method_name}` was not stubbed or was already unstubbed" end message_chains.remove_stub_chains_for!(method_name) stop_observing!(method_name) unless message_chains.has_expectation?(method_name) end