Module: Mongoid::Matchers
- Includes:
- Associations, Document, Validations
- Defined in:
- lib/matchers/helpers.rb,
lib/matchers/matcher.rb,
lib/mongoid-minitest.rb,
lib/matchers/document/document.rb,
lib/matchers/validations/format.rb,
lib/matchers/validations/length.rb,
lib/matchers/document/have_field.rb,
lib/matchers/document/have_index.rb,
lib/matchers/validations/presence.rb,
lib/matchers/document/be_stored_in.rb,
lib/matchers/validations/exclusion.rb,
lib/matchers/validations/inclusion.rb,
lib/matchers/validations/acceptance.rb,
lib/matchers/validations/associated.rb,
lib/matchers/validations/uniqueness.rb,
lib/matchers/validations/validations.rb,
lib/matchers/validations/confirmation.rb,
lib/matchers/associations/associations.rb
Defined Under Namespace
Modules: Associations, Document, Helpers, Validations Classes: BeStoredInMatcher, HaveIndexMatcher, Matcher
Constant Summary
Constants included from Associations
Associations::BELONGS_TO, Associations::EMBEDDED_IN, Associations::EMBEDS_MANY, Associations::EMBEDS_ONE, Associations::HAS_AND_BELONGS_TO_MANY, Associations::HAS_MANY, Associations::HAS_ONE
Constants included from Document
Document::DOCUMENT, Document::PARANOIA, Document::TIMESTAMPS, Document::VERSIONING
Instance Method Summary collapse
Methods included from Associations
#belong_to, #embed_many, #embed_one, #embedded_in, #have_and_belong_to_many, #have_many, #have_one
Methods included from Validations
#validate_acceptance_of, #validate_associated, #validate_confirmation_of, #validate_exclusion_of, #validate_format_of, #validate_inclusion_of, #validate_length_of, #validate_presence_of, #validate_uniqueness_of
Methods included from Document
#be_document, #be_paranoid, #be_timestamped, #be_versioned, #have_field
Instance Method Details
#be_stored_in(collection_name) ⇒ Object
17 18 19 |
# File 'lib/matchers/document/be_stored_in.rb', line 17 def be_stored_in(collection_name) BeStoredInMatcher.new(collection_name) end |
#have_index_for(*fields) ⇒ Object
32 33 34 |
# File 'lib/matchers/document/have_index.rb', line 32 def have_index_for(*fields) HaveIndexMatcher.new(*fields) end |