Sha256: fe952fbdfe4d6ba0051419f07c7ad6ef47f7dc4d8f03194af2fcbe90e180b75d

Contents?: true

Size: 499 Bytes

Versions: 236

Compression:

Stored size: 499 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}" } }

  subject { FactoryGirl::Attribute::Sequence.new(name, sequence_name, false) }
  before  { FactoryGirl.register_sequence(sequence) }

  its(:name) { should == name }

  it "assigns the next value in the sequence" do
    subject.to_proc.call.should == "Name 5"
  end
end

Version data entries

236 entries across 118 versions & 8 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.5 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.5 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.4 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.4 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.4 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.3 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.3 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.3 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl/attribute/sequence_spec.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/factory_girl-2.6.4/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.2 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.2 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.2 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.1 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.1 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.1 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.0 vendor/bundle/gems/factory_girl-3.3.0/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.0 vendor/bundle/gems/factory_girl-3.0.0/spec/factory_girl/attribute/sequence_spec.rb
classiccms-0.7.0 vendor/bundle/gems/factory_girl-3.2.0/spec/factory_girl/attribute/sequence_spec.rb
challah-1.0.0.beta vendor/bundle/gems/factory_girl-4.1.0/spec/factory_girl/attribute/sequence_spec.rb