Module: RSpec::Rails::Orm::DataMapper
- 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
71
72
73
74
|
# File 'lib/rspec_for_generators/rails_helpers/rails_orm.rb', line 71
def field name, type = nil
return "property :#{name}, #{type}" if type
"property :#{name}"
end
|
#file_content(name) ⇒ Object
67
68
69
|
# File 'lib/rspec_for_generators/rails_helpers/rails_orm.rb', line 67
def file_content name
file_w_include(name) { 'DataMapper::Resource' }
end
|