Module: RSpec::Rails::Orm::MongoMapper

Includes:
Base
Defined in:
lib/rspec_for_generators/rails_helpers/rails_orm.rb

Instance Method Summary collapse

Methods included from Model

#create_model, #model_file_name, #remove_model, #remove_models

Instance Method Details

#field(name, type = nil) ⇒ Object



45
46
47
48
# File 'lib/rspec_for_generators/rails_helpers/rails_orm.rb', line 45

def field name, type = nil
  return "key :#{name}, #{type}" if type
  "key :#{name}"
end

#file_content(name) ⇒ Object



41
42
43
# File 'lib/rspec_for_generators/rails_helpers/rails_orm.rb', line 41

def file_content name
  file_w_include(name) { 'MongoMapper::Document' }
end