Sha256: 1c0822e4a10b2e6438d6a06fb30b8bd2d504b36bb98ba5c631eee1d80b022b0c
Contents?: true
Size: 606 Bytes
Versions: 22
Compression:
Stored size: 606 Bytes
Contents
require 'spec_helper' describe FactoryGirl::Proxy::AttributesFor do let(:result) { { :name => "John Doe", :gender => "Male", :admin => false } } let(:attribute_assigner) { stub("attribute assigner", :hash => result) } it_should_behave_like "proxy without association support" it "returns the hash from the attribute assigner" do subject.result(attribute_assigner, lambda {|item| item }).should == result end it "does not run the to_create block" do expect do subject.result(attribute_assigner, lambda {|item| raise "failed" }) end.to_not raise_error end end
Version data entries
22 entries across 22 versions & 2 rubygems