Sha256: 566fd0eaac0c52deabc59554e71315295ab0339bef08e9e4dc3d2797487db5c8
Contents?: true
Size: 581 Bytes
Versions: 3
Compression:
Stored size: 581 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) } 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, false) end end describe FactoryGirl::Attribute::Static, "with a string name" do subject { FactoryGirl::Attribute::Static.new("name", nil) } its(:name) { should == :name } end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
factory_girl-2.1.2 | spec/factory_girl/attribute/static_spec.rb |
factory_girl-2.1.0 | spec/factory_girl/attribute/static_spec.rb |
factory_girl-2.0.5 | spec/factory_girl/attribute/static_spec.rb |