Sha256: 4e4444b5c8f34a2a9e5ccffc7f3be213d63c708c4c1be396742bd74e35c54862

Contents?: true

Size: 510 Bytes

Versions: 83

Compression:

Stored size: 510 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper')

describe <%= class_name %> do
  before(:each) do
    @valid_attributes = {
<% attributes.each_with_index do |attribute, attribute_index| -%>
      :<%= attribute.name %> => <%= attribute.default_value %><%= attribute_index == attributes.length - 1 ? '' : ','%>
<% end -%>
    }
  end

  it "should create a new instance given valid attributes" do
    <%= class_name %>.create!(@valid_attributes)
  end
end

Version data entries

83 entries across 83 versions & 13 rubygems

Version Path
rspec-rails-1.1.6 generators/rspec_model/templates/model_spec.rb
rspec-rails-1.2.0 generators/rspec_model/templates/model_spec.rb
rspec-rails-1.1.9 generators/rspec_model/templates/model_spec.rb
rspec-rails-1.1.7 generators/rspec_model/templates/model_spec.rb
rspec-rails-1.1.8 generators/rspec_model/templates/model_spec.rb
rspec-rails-1.1.12 generators/rspec_model/templates/model_spec.rb
rspec-rails-1.2.3 generators/rspec_model/templates/model_spec.rb
rspec-rails-1.2.6 generators/rspec_model/templates/model_spec.rb
rspec-rails-1.2.1 generators/rspec_model/templates/model_spec.rb
rspec-rails-1.2.5 generators/rspec_model/templates/model_spec.rb
rspec-rails-1.2.4 generators/rspec_model/templates/model_spec.rb
rspec-rails-1.2.2 generators/rspec_model/templates/model_spec.rb
spree-0.4.1 vendor/plugins/rspec-rails/generators/rspec_model/templates/model_spec.rb
spree-0.4.0 vendor/plugins/rspec-rails/generators/rspec_model/templates/model_spec.rb
spree-0.5.0 vendor/plugins/rspec-rails/generators/rspec_model/templates/model_spec.rb
spree-0.6.0 vendor/plugins/rspec-rails/generators/rspec_model/templates/model_spec.rb
spree-0.5.1 vendor/plugins/rspec-rails/generators/rspec_model/templates/model_spec.rb
spree-0.7.1 vendor/plugins/rspec-rails/generators/rspec_model/templates/model_spec.rb
spree-0.7.0 vendor/plugins/rspec-rails/generators/rspec_model/templates/model_spec.rb
spree-0.8.0 vendor/plugins/rspec-rails/generators/rspec_model/templates/model_spec.rb