[rspec-users] as_null_object

rhydiant rhydiant at googlemail.com
Wed May 26 23:01:26 EDT 2010


Given that RSpec has the following methods to create test doubles ...

  double(:my_test_double)
  mock(:my_mock_object)
  stub(:my_stub)

Is there a way to/ plans to introduce a similar syntax for null
objects?

  null_object(:my_null_object)

Instead of mock(:bar, :is_null_object => true) or
mock(:foo).as_null_object

I think this would be cleaner, what do you think?


More information about the rspec-users mailing list