Sha256: ab28dbe584a0076be30d94b17d3782726da096e90fb0f3ca355c390ec0701288
Contents?: true
Size: 416 Bytes
Versions: 42
Compression:
Stored size: 416 Bytes
Contents
require 'spec_helper' describe "default strategy" do it "uses create when not specified" do define_model('User') FactoryGirl.define do factory :user end Factory(:user).should_not be_new_record end it "can be overridden" do define_model('User') FactoryGirl.define do factory :user, :default_strategy => :build end Factory(:user).should be_new_record end end
Version data entries
42 entries across 37 versions & 3 rubygems
Version | Path |
---|---|
factory_girl-2.1.0 | spec/acceptance/default_strategy_spec.rb |
factory_girl-2.0.5 | spec/acceptance/default_strategy_spec.rb |