mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
5f1a1de114
This commit applies the changes from running `standardrb --fix`
14 lines
471 B
Ruby
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
|