Sha256: 6621e6d02469321964a69753ed0dba26029591ef1f46b8bf838352b35a4681ff
Contents?: true
Size: 487 Bytes
Versions: 39
Compression:
Stored size: 487 Bytes
Contents
require "spec_helper" describe "defining a child factory before a parent" do before do define_model("User", :name => :string, :admin => :boolean, :email => :string, :upper_email => :string, :login => :string) FactoryGirl.define do factory :admin, :parent => :user do admin true end factory :user do name "awesome" end end end it "creates admin factories correctly" do FactoryGirl.create(:admin).should be_admin end end
Version data entries
39 entries across 34 versions & 3 rubygems