Sha256: 059b70b6d12c2993be993b1c654085d9fbfa5175b7fff235d56566027e1be690
Contents?: true
Size: 588 Bytes
Versions: 2
Compression:
Stored size: 588 Bytes
Contents
require 'spec_helper' describe FactoryGirl::Attribute::Static do let(:name) { :first_name } let(:value) { "John" } let(:proxy) { stub("proxy") } subject { FactoryGirl::Attribute::Static.new(name, value, false) } its(:name) { should == name } it "sets its static value on a proxy" do proxy.stubs(:set) subject.add_to(proxy) proxy.should have_received(:set).with(name, value) end end describe FactoryGirl::Attribute::Static, "with a string name" do subject { FactoryGirl::Attribute::Static.new("name", nil, false) } its(:name) { should == :name } end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
factory_girl-2.3.0 | spec/factory_girl/attribute/static_spec.rb |
factory_girl-2.2.0 | spec/factory_girl/attribute/static_spec.rb |