Method: Remarkable::Mongoid::Matchers#be_referenced_in

Defined in:
lib/remarkable/mongoid/relations.rb

#be_referenced_in(attr) ⇒ Remarkable::Mongoid::Matchers::RelationMatcher

Specify the document is referenced in another document

examples:

it { should be_referenced_in :dog }

Parameters:

  • (Symbol)

Returns:



48
49
50
# File 'lib/remarkable/mongoid/relations.rb', line 48

def be_referenced_in(attr)
  RelationMatcher.new(attr, ::Mongoid::Relations::Referenced::In)
end