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
factory_girl-3.0.0.rc1 spec/acceptance/aliases_spec.rb