module Mongoid::Matchers::Associations

Constants

BELONGS_TO
EMBEDDED_IN
EMBEDS_MANY
EMBEDS_ONE
HAS_AND_BELONGS_TO_MANY
HAS_MANY
HAS_ONE

Public Instance Methods

be_embedded_in(association_name) click to toggle source
# File lib/matchers/associations.rb, line 306
def be_embedded_in(association_name)
  HaveAssociationMatcher.new(association_name, EMBEDDED_IN)
end
belong_to(association_name)
Alias for: belong_to_related
embed_many(association_name) click to toggle source
# File lib/matchers/associations.rb, line 302
def embed_many(association_name)
  HaveAssociationMatcher.new(association_name, EMBEDS_MANY)
end
embed_one(association_name) click to toggle source
# File lib/matchers/associations.rb, line 298
def embed_one(association_name)
  HaveAssociationMatcher.new(association_name, EMBEDS_ONE)
end
have_and_belong_to_many(association_name) click to toggle source
# File lib/matchers/associations.rb, line 320
def have_and_belong_to_many(association_name)
  HaveAssociationMatcher.new(association_name, HAS_AND_BELONGS_TO_MANY)
end
have_many(association_name)
Alias for: have_many_related
have_one(association_name)
Alias for: have_one_related