diff options
-rw-r--r-- | spec/factories/users.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/factories/users.rb b/spec/factories/users.rb index 249dabbaae8..aa4697580fd 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -1,5 +1,16 @@ FactoryGirl.define do - sequence(:name) { FFaker::Name.name } + # Git remove periods from the end of the name so we remove it too so we don't + # have false-negative in specs that expect against author/commiter name: + # + # $ git commit --author='Foo Sr. <foo@example.com>' -m 'Where's my trailing period?' + # + # results in this: + # + # $ git show --pretty + # ... + # Author: Foo Sr <foo@example.com> + # ... + sequence(:name) { FFaker::Name.name.chomp("\.") } factory :user, aliases: [:author, :assignee, :recipient, :owner, :creator, :resource_owner] do email { FFaker::Internet.email } |