Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More doc.

  • Loading branch information...
commit de06f4fc906f86b2fc4021b3b36a5aadab914698 1 parent dde1ddc
@nmerouze nmerouze authored
View
5 lib/remarkable_mongomapper/matchers/validate_presence_of_matcher.rb
@@ -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
#
View
2  spec/matchers/have_key_matcher_spec.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.