1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00
thoughtbot--factory_bot/spec/factory_bot/attribute/sequence_spec.rb
Daniel Colson 5f1a1de114 Run standardrb
This commit applies the changes from running `standardrb --fix`
2020-06-10 17:11:39 -04:00

14 lines
471 B
Ruby

describe FactoryBot::Attribute::Sequence do
let(:sequence_name) { :name }
let(:name) { :first_name }
let(:sequence) { FactoryBot::Sequence.new(sequence_name, 5) { |n| "Name #{n}" } }
subject { FactoryBot::Attribute::Sequence.new(name, sequence_name, false) }
before { FactoryBot::Internal.register_sequence(sequence) }
its(:name) { should eq name }
it "assigns the next value in the sequence" do
expect(subject.to_proc.call).to eq "Name 5"
end
end