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

26 lines
455 B
Ruby
Raw Normal View History

require 'spec_helper'
require 'acceptance/acceptance_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