1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00
thoughtbot--factory_bot/spec/acceptance/default_strategy_spec.rb
2011-08-19 17:21:54 -04:00

24 lines
416 B
Ruby

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