Module: Mongoid::Matchers::Document

Included in:
Mongoid::Matchers
Defined in:
lib/matchers/document/document.rb,
lib/matchers/document/have_field.rb

Defined Under Namespace

Classes: DocumentMatcher, HaveFieldMatcher

Constant Summary collapse

DOCUMENT =
Mongoid::Document
PARANOIA =
Mongoid::Paranoia
VERSIONING =
Mongoid::Versioning
TIMESTAMPS =
Mongoid::Timestamps

Instance Method Summary collapse

Instance Method Details

#be_documentObject



31
32
33
# File 'lib/matchers/document/document.rb', line 31

def be_document
  DocumentMatcher.new DOCUMENT
end

#be_paranoidObject



35
36
37
# File 'lib/matchers/document/document.rb', line 35

def be_paranoid
  DocumentMatcher.new PARANOIA
end

#be_timestampedObject



43
44
45
# File 'lib/matchers/document/document.rb', line 43

def be_timestamped
  DocumentMatcher.new TIMESTAMPS
end

#be_versionedObject



39
40
41
# File 'lib/matchers/document/document.rb', line 39

def be_versioned
  DocumentMatcher.new VERSIONING
end

#have_field(*fields) ⇒ Object Also known as: have_fields



73
74
75
# File 'lib/matchers/document/have_field.rb', line 73

def have_field(*fields)
  HaveFieldMatcher.new(*fields)
end