Permalink
Browse files

More doc.

  • Loading branch information...
nmerouze committed Jul 31, 2009
1 parent dde1ddc commit de06f4fc906f86b2fc4021b3b36a5aadab914698
@@ -2,7 +2,6 @@ module Remarkable
module MongoMapper
module Matchers
class ValidatePresenceOfMatcher < Remarkable::MongoMapper::Base
-
arguments :collection => :attributes, :as => :attribute
optional :message
@@ -19,6 +18,10 @@ def allow_nil?
# Ensures that the model cannot be saved if one of the attributes listed is not present.
#
+ # == Options
+ #
+ # * <tt>:message</tt> - value the test expects to find in <tt>errors.on(:attribute)</tt>.
+ # Regexp, string or symbol. Default = "can't be empty"
#
# == Examples
#
@@ -9,7 +9,7 @@
it 'should contain a description' do
matcher = have_key(:title, String)
- matcher.description.should == 'have key(s) title'
+ matcher.description.should == 'have key(s) title with type String'
end
it 'should set has_key? message' do

0 comments on commit de06f4f

Please sign in to comment.