Sha256: 39711b0d49697f0b72396a4555e691e0b47ea2296c538319a0a1651643b0371f

Contents?: true

Size: 536 Bytes

Versions: 11

Compression:

Stored size: 536 Bytes

Contents

require "spec_helper"

describe "declaring attributes on a Factory that are private methods on Object" do
  before do
    define_model("Website", :system => :boolean, :link => :string, :sleep => :integer)

    FactoryGirl.define do
      factory :website do
        system false
        link   "http://example.com"
        sleep  15
      end
    end
  end

  subject { FactoryGirl.build(:website, :sleep => -5) }

  its(:system) { should == false }
  its(:link)   { should == "http://example.com" }
  its(:sleep)  { should == -5 }
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
challah-0.3.0 vendor/bundle/gems/factory_girl-2.5.0/spec/acceptance/attribute_existing_on_object.rb
challah-0.2.1 vendor/bundle/gems/factory_girl-2.5.0/spec/acceptance/attribute_existing_on_object.rb
challah-0.2.0 vendor/bundle/gems/factory_girl-2.5.0/spec/acceptance/attribute_existing_on_object.rb
factory_girl-2.5.0 spec/acceptance/attribute_existing_on_object.rb
factory_girl-2.4.2 spec/acceptance/attribute_existing_on_object.rb
factory_girl-2.4.1 spec/acceptance/attribute_existing_on_object.rb
factory_girl-2.4.0 spec/acceptance/attribute_existing_on_object.rb
factory_girl-2.3.2 spec/acceptance/attribute_existing_on_object.rb
factory_girl-2.3.1 spec/acceptance/attribute_existing_on_object.rb
factory_girl-2.3.0 spec/acceptance/attribute_existing_on_object.rb
factory_girl-2.2.0 spec/acceptance/attribute_existing_on_object.rb