Module: RSpec::Rails::Model::MongoMapper
- Defined in:
- lib/rspec_for_generators/rails_helpers/rails_model.rb
Instance Method Summary collapse
Instance Method Details
#field(name, type = nil) ⇒ Object
18 19 20 21 |
# File 'lib/rspec_for_generators/rails_helpers/rails_model.rb', line 18 def field name, type = nil return "key :#{name}, #{type}" if type "key :#{name}" end |
#file_content(name) ⇒ Object
12 13 14 15 16 |
# File 'lib/rspec_for_generators/rails_helpers/rails_model.rb', line 12 def file_content name %Q{class #{name.camelize} include MongoMapper::Document end} end |