mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
13 lines
464 B
Ruby
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
|