Sha256: 1c6e2dac767ac63acf7eec431f63a572bb9f8a0542a57d1f3635bae1e6e2d14e
Contents?: true
Size: 594 Bytes
Versions: 3
Compression:
Stored size: 594 Bytes
Contents
require 'spec_helper' describe FactoryGirl::Attribute::Sequence do let(:sequence_name) { :name } let(:name) { :first_name } let(:sequence) { FactoryGirl::Sequence.new(sequence_name, 5) { |n| "Name #{n}" } } let(:proxy) { stub("proxy") } subject { FactoryGirl::Attribute::Sequence.new(name, sequence_name) } before { FactoryGirl.register_sequence(sequence) } its(:name) { should == name } it "assigns the next value in the sequence" do proxy.stubs(:set) subject.add_to(proxy) proxy.should have_received(:set).with(name, "Name 5") end end
Version data entries
3 entries across 3 versions & 1 rubygems