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
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/factory_girl-3.2.0/spec/acceptance/aliases_spec.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/factory_girl-3.3.0/spec/acceptance/aliases_spec.rb
rails-uploader-0.0.1 vendor/bundle/ruby/1.9.1/gems/factory_girl-3.2.0/spec/acceptance/aliases_spec.rb
classiccms-0.2.4.pre vendor/bundle/gems/factory_girl-3.0.0/spec/acceptance/aliases_spec.rb
classiccms-0.2.4.pre vendor/bundle/gems/factory_girl-3.3.0/spec/acceptance/aliases_spec.rb
classiccms-0.2.4.pre vendor/bundle/gems/factory_girl-3.2.0/spec/acceptance/aliases_spec.rb
challah-0.6.0 vendor/bundle/gems/factory_girl-3.3.0/spec/acceptance/aliases_spec.rb
challah-0.6.0 vendor/bundle/gems/factory_girl-3.0.0/spec/acceptance/aliases_spec.rb
factory_girl-3.3.0 spec/acceptance/aliases_spec.rb
factory_girl-3.2.0 spec/acceptance/aliases_spec.rb
factory_girl-3.1.1 spec/acceptance/aliases_spec.rb
factory_girl-3.1.0 spec/acceptance/aliases_spec.rb
challah-0.5.4 vendor/bundle/gems/factory_girl-3.0.0/spec/acceptance/aliases_spec.rb
classicCMS-0.2.3 vendor/bundle/gems/factory_girl-3.0.0/spec/acceptance/aliases_spec.rb
classicCMS-0.2.2 vendor/bundle/gems/factory_girl-3.0.0/spec/acceptance/aliases_spec.rb
classicCMS-0.2.1 vendor/bundle/gems/factory_girl-3.0.0/spec/acceptance/aliases_spec.rb
classicCMS-0.2.0 vendor/bundle/gems/factory_girl-3.0.0/spec/acceptance/aliases_spec.rb
classicCMS-0.1.2 vendor/bundle/gems/factory_girl-3.0.0/spec/acceptance/aliases_spec.rb
challah-0.5.3 vendor/bundle/gems/factory_girl-3.0.0/spec/acceptance/aliases_spec.rb
factory_girl-3.0.0 spec/acceptance/aliases_spec.rb