Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
5c1496a4
Commit
5c1496a4
authored
Nov 30, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve project factories
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
f7d8467a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
features/steps/shared/project.rb
features/steps/shared/project.rb
+1
-1
spec/factories/projects.rb
spec/factories/projects.rb
+18
-0
No files found.
features/steps/shared/project.rb
View file @
5c1496a4
...
...
@@ -131,7 +131,7 @@ module SharedProject
end
step
'public empty project "Empty Public Project"'
do
create
:
empty_project
,
:public
,
name:
"Empty Public Project"
create
:
project_empty_repo
,
:public
,
name:
"Empty Public Project"
end
step
'project "Community" has comments'
do
...
...
spec/factories/projects.rb
View file @
5c1496a4
...
...
@@ -27,6 +27,10 @@
#
FactoryGirl
.
define
do
# Project without repository
#
# Project does not have bare repository.
# Use this factory if you dont need repository in tests
factory
:empty_project
,
class:
'Project'
do
sequence
(
:name
)
{
|
n
|
"project
#{
n
}
"
}
path
{
name
.
downcase
.
gsub
(
/\s/
,
'_'
)
}
...
...
@@ -47,6 +51,20 @@ FactoryGirl.define do
end
end
# Project with empty repository
#
# This is a case when you just created a project
# but not pushed any code there yet
factory
:project_empty_repo
,
parent: :empty_project
do
after
:create
do
|
project
|
project
.
create_repository
end
end
# Project with test repository
#
# Test repository source can be found at
# https://gitlab.com/gitlab-org/gitlab-test
factory
:project
,
parent: :empty_project
do
path
{
'gitlabhq'
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment