Sha256: de39394fd559a0a9e635fd600f26868149ed0c4c52dabda77dc68e360cd73327

Contents?: true

Size: 503 Bytes

Versions: 236

Compression:

Stored size: 503 Bytes

Contents

require 'spec_helper'

describe FactoryGirl::Attribute::Static do
  let(:name)  { :first_name }
  let(:value) { "John" }

  subject { FactoryGirl::Attribute::Static.new(name, value, false) }

  its(:name) { should == name }

  it "returns the value when executing the proc" do
    subject.to_proc.call.should == value
  end
end

describe FactoryGirl::Attribute::Static, "with a string name" do
  subject    { FactoryGirl::Attribute::Static.new("name", nil, false) }
  its(:name) { should == :name }
end

Version data entries

236 entries across 118 versions & 8 rubygems

Version Path
classiccms-0.6.7 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl/attribute/static_spec.rb
factory_girl-3.6.2 spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.6 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.6 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.6 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.5 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.5 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.5 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.4 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.4 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.4 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.3 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.3 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.3 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.2 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.2 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.2 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.1 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.1 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl/attribute/static_spec.rb
classiccms-0.6.1 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl/attribute/static_spec.rb