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/factory_girl/strategy/create_spec.rb
2012-02-10 18:19:17 -05:00

13 lines
464 B
Ruby

require 'spec_helper'
describe FactoryGirl::Strategy::Create do
it_should_behave_like "strategy with association support", FactoryGirl::Strategy::Create
it_should_behave_like "strategy with callbacks", :after_build, :after_create
it "runs a custom create block" do
block_run = false
block = lambda {|instance| block_run = true }
subject.result(stub("assigner", :object => stub("result instance")), block)
block_run.should be_true
end
end