Module: Mongoid::Matchers
- Includes:
- Associations, Validations
- Defined in:
- lib/mongoid-rspec.rb,
lib/matchers/document.rb,
lib/matchers/validations.rb,
lib/matchers/associations.rb,
lib/matchers/validations/format_of.rb,
lib/matchers/validations/length_of.rb,
lib/matchers/validations/associated.rb,
lib/matchers/validations/presence_of.rb,
lib/matchers/validations/inclusion_of.rb,
lib/matchers/validations/uniqueness_of.rb,
lib/matchers/validations/numericality_of.rb
Defined Under Namespace
Modules: Associations, Validations Classes: HaveFieldMatcher, SaveMatcher
Constant Summary
Constant Summary
Constants included from Associations
Associations::BELONGS_TO, Associations::EMBEDDED_IN, Associations::EMBEDS_MANY, Associations::EMBEDS_ONE, Associations::HAS_MANY, Associations::HAS_MANY_AS_ARRAY, Associations::HAS_ONE
Instance Method Summary (collapse)
- - (Object) have_field(*args) (also: #have_fields)
- - (Object) save(attributes = {}) (also: #save_properly)
Methods included from Validations
#validate_associated, #validate_format_of, #validate_inclusion_of, #validate_length_of, #validate_numericality_of, #validate_presence_of, #validate_uniqueness_of
Methods included from Associations
#be_embedded_in, #belong_to_related, #embed_many, #embed_one, #have_many_related, #have_one_related
Instance Method Details
- (Object) have_field(*args) Also known as: have_fields
56 57 58 |
# File 'lib/matchers/document.rb', line 56 def have_field(*args) HaveFieldMatcher.new(*args) end |
- (Object) save(attributes = {}) Also known as: save_properly
86 87 88 |
# File 'lib/matchers/document.rb', line 86 def save(attributes = {}) SaveMatcher.new(attributes) end |