mock.as_null_object doesn't do what it says it does
The comments in the implementation suggest that it will respond to every message that isn't explicitly stubbed with
self, but there are some exceptions. Ones we found:
- nil? # returns false
- class? # returns RSpec::Mocks::Mock
- present? # returns false, since blank? returns self, and !self is false
Tech in the World
Joshua Lee, a Summer '12 intern in San Francisco, has co-founded Tech in the World, an initiative to expose top computer science students to underserved needs in developing communities.
Please visit http://www.techintheworld.org/ and consider supporting Joshua and his team.