Sha256: 55a8888f4e5bcd6ad80e8b540558f1b93ff2cc1e0c645bb06c3ad67c3e1aec21

Contents?: true

Size: 548 Bytes

Versions: 23

Compression:

Stored size: 548 Bytes

Contents

require 'spec_helper'

describe FactoryGirl::Attribute do
  let(:name)  { "user" }
  let(:proxy) { stub("proxy") }
  subject     { FactoryGirl::Attribute.new(name, false) }

  its(:name) { should == name.to_sym }
  it { should_not be_association }

  it "raises an error when defining an attribute writer" do
    error_message = %{factory_girl uses 'f.test value' syntax rather than 'f.test = value'}
    expect {
      FactoryGirl::Attribute.new('test=', false)
    }.to raise_error(FactoryGirl::AttributeDefinitionError, error_message)
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
challah-0.6.1 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/attribute_spec.rb
challah-0.6.0 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/attribute_spec.rb
challah-0.5.4 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/attribute_spec.rb
challah-0.5.3 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/attribute_spec.rb
challah-0.5.2 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/attribute_spec.rb
challah-0.5.0 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/attribute_spec.rb
factory_girl-2.5.2 spec/factory_girl/attribute_spec.rb
challah-0.4.1 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/attribute_spec.rb
challah-0.4.0 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/attribute_spec.rb
challah-0.3.5 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/attribute_spec.rb
challah-0.3.4 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/attribute_spec.rb
challah-0.3.3 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/attribute_spec.rb
challah-0.3.2 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/attribute_spec.rb
challah-0.3.1 vendor/bundle/gems/factory_girl-2.5.1/spec/factory_girl/attribute_spec.rb
factory_girl-2.5.1 spec/factory_girl/attribute_spec.rb
challah-0.3.0 vendor/bundle/gems/factory_girl-2.5.0/spec/factory_girl/attribute_spec.rb
challah-0.2.1 vendor/bundle/gems/factory_girl-2.5.0/spec/factory_girl/attribute_spec.rb
challah-0.2.0 vendor/bundle/gems/factory_girl-2.5.0/spec/factory_girl/attribute_spec.rb
factory_girl-2.5.0 spec/factory_girl/attribute_spec.rb
factory_girl-2.4.2 spec/factory_girl/attribute_spec.rb