Sha256: 09e12b206122845a11488f92b12bc9c74caa82323d78251eadf464902a7adb20
Contents?: true
Size: 542 Bytes
Versions: 13
Compression:
Stored size: 542 Bytes
Contents
require 'spec_helper' describe FactoryGirl::Attribute::Sequence do before do @name = :first_name @sequence = :name FactoryGirl.register_sequence(FactoryGirl::Sequence.new(@sequence, 5) { |n| "Name #{n}" }) @attr = FactoryGirl::Attribute::Sequence.new(@name, @sequence) end it "should have a name" do @attr.name.should == @name end it "assigns the next value in the sequence" do proxy = "proxy" stub(proxy).set @attr.add_to(proxy) proxy.should have_received.set(@name, "Name 5") end end
Version data entries
13 entries across 13 versions & 2 rubygems