On Jan 12, 2010, at 10:49 pm, rogerdpack wrote:
> a.should include?("1:4") # if there's no matcher called include? then
> just call include?
Am I right thinking that this would mean writing a method_missing that creates
a matcher for every unhandled message on the example object (whatever scope the
#it block runs in)? If so, that could produce surprising behaviour if methods
were silently turned into matchers and ignored.
Maybe if you restricted it to ? methods it would not be so bad. But then,
that's the point of the be_* handler. The only problem is that #include? is a
verb not an adjective/noun. Can't say I've come across many of them, so it
might be better in these cases to just write a method #a_container_for? ?
Ashley
--
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users