Module: Mongoid::Matchers
- Includes:
- MiniTest::Matchers::ActiveModel, Associations, Document
- Defined in:
- lib/matchers/matcher.rb,
lib/mongoid-minitest.rb,
lib/matchers/document/document.rb,
lib/matchers/document/have_field.rb,
lib/matchers/document/have_index.rb,
lib/matchers/document/be_stored_in.rb,
lib/matchers/associations/associations.rb
Defined Under Namespace
Modules: Associations, Document 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
- #be_stored_in(collection_name) ⇒ Object
-
#have_index_for(*attrs) ⇒ Object
TODO: Add documentation.
Methods included from Associations
#belong_to, #embed_many, #embed_one, #embedded_in, #have_and_belong_to_many, #have_many, #have_one
Methods included from Document
#be_document, #be_paranoid, #be_timestamped, #be_versioned, #have_field
Instance Method Details
#be_stored_in(collection_name) ⇒ Object
3 4 5 |
# File 'lib/matchers/document/be_stored_in.rb', line 3 def be_stored_in collection_name BeStoredInMatcher.new collection_name end |
#have_index_for(*attrs) ⇒ Object
TODO: Add documentation.
4 5 6 |
# File 'lib/matchers/document/have_index.rb', line 4 def have_index_for *attrs HaveIndexMatcher.new(*attrs) end |