xaviershay/rspec-fire — pull request #15 by myronmarston (2012-05-09 21:07:31+00:00)
Title: Allow both instance and class doubles for unloaded classes.

Previously, if you used both fire_double("Foo") and fire_replaced_class_double("Foo"), and Foo was not defined, stubbing or mocking a method on the fire double would fail because ConstantStubber.original_value_for returned nil for "Foo" (since it was originally unloaded), but the constant lookup would succeed and it would try to verify the implementation against the class stub.

Now, ConstantStubber.find_original_value_for yields if the given class has been stubbed, and the value it yields can be nil if it was originally unloaded. This allows us to support this edge case.