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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
4805c64f
Commit
4805c64f
authored
Aug 28, 2012
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove spec/factory and spec/factories
parent
a04b919a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
128 deletions
+0
-128
features/support/env.rb
features/support/env.rb
+0
-1
spec/factories.rb
spec/factories.rb
+0
-97
spec/factory.rb
spec/factory.rb
+0
-29
spec/spec_helper.rb
spec/spec_helper.rb
+0
-1
No files found.
features/support/env.rb
View file @
4805c64f
...
@@ -8,7 +8,6 @@ require 'webmock/cucumber'
...
@@ -8,7 +8,6 @@ require 'webmock/cucumber'
WebMock
.
allow_net_connect!
WebMock
.
allow_net_connect!
require
Rails
.
root
.
join
'spec/factories'
require
Rails
.
root
.
join
'spec/support/monkeypatch'
require
Rails
.
root
.
join
'spec/support/monkeypatch'
require
Rails
.
root
.
join
'spec/support/gitolite_stub'
require
Rails
.
root
.
join
'spec/support/gitolite_stub'
require
Rails
.
root
.
join
'spec/support/login_helpers'
require
Rails
.
root
.
join
'spec/support/login_helpers'
...
...
spec/factories.rb
deleted
100644 → 0
View file @
a04b919a
require
File
.
join
(
Rails
.
root
,
'spec'
,
'factory'
)
Factory
.
add
(
:project
,
Project
)
do
|
obj
|
obj
.
name
=
Faker
::
Internet
.
user_name
obj
.
path
=
'gitlabhq'
obj
.
owner
=
Factory
(
:user
)
obj
.
code
=
'LGT'
end
Factory
.
add
(
:project_without_owner
,
Project
)
do
|
obj
|
obj
.
name
=
Faker
::
Internet
.
user_name
obj
.
path
=
'gitlabhq'
obj
.
code
=
'LGT'
end
Factory
.
add
(
:public_project
,
Project
)
do
|
obj
|
obj
.
name
=
Faker
::
Internet
.
user_name
obj
.
path
=
'gitlabhq'
obj
.
private_flag
=
false
obj
.
owner
=
Factory
(
:user
)
obj
.
code
=
'LGT'
end
Factory
.
add
(
:user
,
User
)
do
|
obj
|
obj
.
email
=
Faker
::
Internet
.
email
obj
.
password
=
"123456"
obj
.
name
=
Faker
::
Name
.
name
obj
.
password_confirmation
=
"123456"
end
Factory
.
add
(
:admin
,
User
)
do
|
obj
|
obj
.
email
=
Faker
::
Internet
.
email
obj
.
password
=
"123456"
obj
.
name
=
Faker
::
Name
.
name
obj
.
password_confirmation
=
"123456"
obj
.
admin
=
true
end
Factory
.
add
(
:issue
,
Issue
)
do
|
obj
|
obj
.
title
=
Faker
::
Lorem
.
sentence
obj
.
author
=
Factory
:user
obj
.
assignee
=
Factory
:user
end
Factory
.
add
(
:merge_request
,
MergeRequest
)
do
|
obj
|
obj
.
title
=
Faker
::
Lorem
.
sentence
obj
.
author
=
Factory
:user
obj
.
assignee
=
Factory
:user
obj
.
source_branch
=
"master"
obj
.
target_branch
=
"stable"
obj
.
closed
=
false
end
Factory
.
add
(
:snippet
,
Snippet
)
do
|
obj
|
obj
.
title
=
Faker
::
Lorem
.
sentence
obj
.
file_name
=
Faker
::
Lorem
.
sentence
obj
.
content
=
Faker
::
Lorem
.
sentences
end
Factory
.
add
(
:note
,
Note
)
do
|
obj
|
obj
.
note
=
Faker
::
Lorem
.
sentence
end
Factory
.
add
(
:key
,
Key
)
do
|
obj
|
obj
.
title
=
"Example key"
obj
.
key
=
File
.
read
(
File
.
join
(
Rails
.
root
,
"db"
,
"pkey.example"
))
end
Factory
.
add
(
:project_hook
,
ProjectHook
)
do
|
obj
|
obj
.
url
=
Faker
::
Internet
.
uri
(
"http"
)
end
Factory
.
add
(
:system_hook
,
SystemHook
)
do
|
obj
|
obj
.
url
=
Faker
::
Internet
.
uri
(
"http"
)
end
Factory
.
add
(
:wiki
,
Wiki
)
do
|
obj
|
obj
.
title
=
Faker
::
Lorem
.
sentence
obj
.
content
=
Faker
::
Lorem
.
sentence
obj
.
user
=
Factory
(
:user
)
obj
.
project
=
Factory
(
:project
)
end
Factory
.
add
(
:event
,
Event
)
do
|
obj
|
obj
.
title
=
Faker
::
Lorem
.
sentence
obj
.
project
=
Factory
(
:project
)
end
Factory
.
add
(
:milestone
,
Milestone
)
do
|
obj
|
obj
.
title
=
Faker
::
Lorem
.
sentence
obj
.
due_date
=
Date
.
today
+
1
.
month
end
Factory
.
add
(
:users_project
,
UsersProject
)
do
|
obj
|
obj
.
user
=
Factory
:user
obj
.
project
=
Factory
:project
end
spec/factory.rb
deleted
100644 → 0
View file @
a04b919a
class
Factory
@factories
=
{}
class
<<
self
def
add
(
name
,
klass
,
&
block
)
@factories
[
name
]
=
[
klass
,
block
]
end
def
create
(
name
,
opts
=
{})
new
(
name
,
opts
).
tap
(
&
:save!
)
end
def
new
(
name
,
opts
=
{})
factory
=
@factories
[
name
]
factory
[
0
].
new
.
tap
do
|
obj
|
factory
[
1
].
call
(
obj
)
end
.
tap
do
|
obj
|
opts
.
each
do
|
k
,
opt
|
obj
.
send
(
"
#{
k
}
="
,
opt
)
end
end
end
end
end
def
Factory
(
name
,
opts
=
{})
Factory
.
create
name
,
opts
end
spec/spec_helper.rb
View file @
4805c64f
...
@@ -10,7 +10,6 @@ require 'rspec/rails'
...
@@ -10,7 +10,6 @@ require 'rspec/rails'
require
'capybara/rails'
require
'capybara/rails'
require
'capybara/rspec'
require
'capybara/rspec'
require
'webmock/rspec'
require
'webmock/rspec'
require
'factories'
require
'email_spec'
require
'email_spec'
require
'headless'
require
'headless'
...
...
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