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/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
Instance Method Summary collapse
- #have_field(*args) ⇒ Object (also: #have_fields)
- #save(attributes = {}) ⇒ Object (also: #save_properly)
Methods included from Validations
#validate_associated, #validate_format_of, #validate_inclusion_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
#have_field(*args) ⇒ Object Also known as: have_fields
56 57 58 |
# File 'lib/matchers/document.rb', line 56 def have_field(*args) HaveFieldMatcher.new(*args) end |
#save(attributes = {}) ⇒ Object Also known as: save_properly
86 87 88 |
# File 'lib/matchers/document.rb', line 86 def save(attributes = {}) SaveMatcher.new(attributes) end |