Sha256: 85a4df21d9dd8f0c62d1968ec25f5715d2d7e1895c378fc3274f0afc947f7dc9
Contents?: true
Size: 631 Bytes
Versions: 88
Compression:
Stored size: 631 Bytes
Contents
require 'spec_helper' describe FactoryGirl::Strategy::Create do it_should_behave_like "strategy with association support", :create it_should_behave_like "strategy with callbacks", :after_build, :before_create, :after_create it "runs a custom create block" do evaluation_class = Class.new do def initialize @block_run = false end attr_reader :block_run def create(*instance) @block_run = true end end evaluation = evaluation_class.new evaluation.stubs(object: nil, notify: nil) subject.result(evaluation) evaluation.block_run.should be_true end end
Version data entries
88 entries across 79 versions & 5 rubygems