Method: Remarkable::Mongoid::Matchers#have_field
- Defined in:
- lib/remarkable/mongoid/fields.rb
#have_field(field, options = {}) ⇒ Remarkable::Mongoid::Matchers::HasFieldMatcher
Specify the document should have a field
examples:
it { should have_field :name }
it { should have_field :age, :type => Integer, :default => 0 }
15 16 17 |
# File 'lib/remarkable/mongoid/fields.rb', line 15 def have_field(field, = {}) HasFieldMatcher.new(field, ) end |