Sha256: bb79dc86bf66ed7cee59c6d709a4c661304254c13e19416606a1c5b3216dd1e0

Contents?: true

Size: 394 Bytes

Versions: 201

Compression:

Stored size: 394 Bytes

Contents

require "spec_helper"

describe "aliases and overrides" do
  before do
    FactoryGirl.aliases << [/one/, "two"]

    define_model("User", two: :string, one: :string)

    FactoryGirl.define do
      factory :user do
        two "set value"
      end
    end
  end

  subject { FactoryGirl.create(:user, one: "override") }
  its(:one) { should == "override" }
  its(:two) { should be_nil }
end

Version data entries

201 entries across 93 versions & 7 rubygems

Version Path
classiccms-0.5.12 vendor/bundle/gems/factory_girl-3.2.0/spec/acceptance/aliases_spec.rb
classiccms-0.5.12 vendor/bundle/gems/factory_girl-3.0.0/spec/acceptance/aliases_spec.rb
classiccms-0.5.11 vendor/bundle/gems/factory_girl-3.3.0/spec/acceptance/aliases_spec.rb
classiccms-0.5.11 vendor/bundle/gems/factory_girl-3.2.0/spec/acceptance/aliases_spec.rb
classiccms-0.5.11 vendor/bundle/gems/factory_girl-3.0.0/spec/acceptance/aliases_spec.rb
challah-rolls-0.1.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/factory_girl-3.6.1/spec/acceptance/aliases_spec.rb
challah-rolls-0.1.0 vendor/bundle/gems/factory_girl-4.0.0/spec/acceptance/aliases_spec.rb
challah-rolls-0.1.0 vendor/bundle/gems/factory_girl-3.6.1/spec/acceptance/aliases_spec.rb
challah-0.8.0.pre vendor/bundle/gems/factory_girl-3.6.1/spec/acceptance/aliases_spec.rb
challah-0.7.1 vendor/bundle/gems/factory_girl-3.6.1/spec/acceptance/aliases_spec.rb
classiccms-0.5.10 vendor/bundle/gems/factory_girl-3.3.0/spec/acceptance/aliases_spec.rb
classiccms-0.5.10 vendor/bundle/gems/factory_girl-3.2.0/spec/acceptance/aliases_spec.rb
classiccms-0.5.10 vendor/bundle/gems/factory_girl-3.0.0/spec/acceptance/aliases_spec.rb
classiccms-0.5.9 vendor/bundle/gems/factory_girl-3.2.0/spec/acceptance/aliases_spec.rb
classiccms-0.5.9 vendor/bundle/gems/factory_girl-3.0.0/spec/acceptance/aliases_spec.rb
classiccms-0.5.9 vendor/bundle/gems/factory_girl-3.3.0/spec/acceptance/aliases_spec.rb
challah-0.7.0 vendor/bundle/gems/factory_girl-3.6.1/spec/acceptance/aliases_spec.rb
challah-0.7.0.pre2 vendor/bundle/gems/factory_girl-3.6.1/spec/acceptance/aliases_spec.rb
classiccms-0.5.8 vendor/bundle/gems/factory_girl-3.2.0/spec/acceptance/aliases_spec.rb
classiccms-0.5.8 vendor/bundle/gems/factory_girl-3.3.0/spec/acceptance/aliases_spec.rb