hey there,
I have a model which different contexts, e.g:
class Article
...
validates_present :user, :when => [:publish]
...
end
how could I spec this:
@article.user = nil
@article.should_not be_valid_for_publish_context
but it should be for others
any ideas?
thanks in advance
joaquin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DataMapper" 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/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---