Similarly, calling should_not on a string works like this:
string.should_not(be_blank)
def be_blank
Blank.new
end
class Blank
def matches?(string)
@actual = string
string.blank?
end
...
...
end
And as David Chelimsky pointed out it is change() and be_blank() that
care about what type of the object calling should and should_not--the
object is either the correct type, or an error occurs.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.