search for: returns_nil

Displaying 1 result from an estimated 1 matches for "returns_nil".

2007 Jan 30
0
nil object in mocks
...work nicely in most views. The question for you all is: what should the syntax look like? We''ve considered a couple of options but found them lacking. They are m = mock(''returns nil'', :nil_object => true) m = mock(''returns nil'', :null_object => :returns_nil) Hopefully someone on the list can come up with something more compelling. Another idea that just came to me (funny how lunch break has that effect): m = mock(''returns nil'', :default => nil) could be useful like this also m = mock(''returns 5'', :default =&...