diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-01-16 23:06:18 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-01-17 16:02:07 -0500 |
commit | a8b4ab9da4b8d6338ab035c24f0be3d1dea556bb (patch) | |
tree | c1a8805243c2f35e575390eca4c38d27a19f8d3d /spec/factories | |
parent | 65046d9a5e84defb1bd0a0508e085a8cc023bc6f (diff) | |
download | gitlab-ce-a8b4ab9da4b8d6338ab035c24f0be3d1dea556bb.tar.gz |
Add a `:repository` trait to the `:empty_project` factory
Right now this is a no-op. We're going to add it as a trait argument to
all existing usages of the `:project` factory, so that later we can flip
`:empty_project` to just be `:project`, forcing developers to opt-in to
the slower option when their tests truly require it.
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/projects.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb index 1cdbe4fc9a5..992580a6b34 100644 --- a/spec/factories/projects.rb +++ b/spec/factories/projects.rb @@ -32,6 +32,10 @@ FactoryGirl.define do request_access_enabled true end + trait :repository do + # no-op... for now! + end + trait :empty_repo do after(:create) do |project| project.create_repository |