M
Matthew Rudy Jacobs
Hey there guys,
not sure where I should discuss this really,
but I've created a ticket on LightHouse for rSpec.
Came across this problem;
"I have a method which either returns an array or a nil, how can I rspec
assert this?"
solution could be
[NilClass, Array].should include(Model.get_array_or_nil)
but that's rubbish.
I want;
Model.get_array_or_nil.should
either(be_an_instance_of(Array)).or(be_nil)
http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/410-adding-an-either-or-matcher
should provide that.
(although it's built against the old svn repo, need to update it for
GIT)
Any thoughts?
MatthewRudy
not sure where I should discuss this really,
but I've created a ticket on LightHouse for rSpec.
Came across this problem;
"I have a method which either returns an array or a nil, how can I rspec
assert this?"
solution could be
[NilClass, Array].should include(Model.get_array_or_nil)
but that's rubbish.
I want;
Model.get_array_or_nil.should
either(be_an_instance_of(Array)).or(be_nil)
http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/410-adding-an-either-or-matcher
should provide that.
(although it's built against the old svn repo, need to update it for
GIT)
Any thoughts?
MatthewRudy