lib/rspec/mocks/test_double.rb in rspec-mocks-2.99.2 vs lib/rspec/mocks/test_double.rb in rspec-mocks-2.99.3
- old
+ new
@@ -138,10 +138,10 @@
Mocks.allow_message(self, message).and_return(response)
end
end
def __warn_of_expired_use_if_expired
- if @__unfrozen_attributes[:expired]
+ if @__unfrozen_attributes && @__unfrozen_attributes[:expired]
RSpec.deprecate "Continuing to use a test double after it has been reset (e.g. in a subsequent example)"
end
end
def __mock_proxy