search for: nil_object

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

Did you mean: new_object
2007 Jan 30
0
nil object in mocks
...turn value to nil, which doesn''t play so well with method chaining, but does 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...