[rspec-users] Can I do foo.should (be_nil || be_empty) in rspec

Zach Dennis zach.dennis at gmail.com
Tue Nov 4 11:44:14 EST 2008


On Tue, Nov 4, 2008 at 11:36 AM, Andrew Premdas <apremdas at gmail.com> wrote:
> Ok I see. I was approaching this more from the syntax that my stories can
> express rather than what my code does. However from these replies and a
> re-read of the cucumber wiki I can see that any step that requires the
> (foo||bar) construct is by definition a conjunction and can be broken into
> smaller steps.
> However we only have 'And' available in stories, do we need 'Or'?

What is your scenario that you are thinking of using an "or" ? This
may be helpful, otherwise we're going to speculating about the
theoretical use cases. I'd rather focus on your specific use case. :)

-- 
Zach Dennis
http://www.continuousthinking.com
http://www.mutuallyhuman.com


More information about the rspec-users mailing list