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
Tatuya Kamada
gitlab-ce
Commits
d7ea9052
Commit
d7ea9052
authored
Oct 09, 2011
by
gitlabhq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests seed
parent
035196e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
db/fixtures/test/001_repo.rb
db/fixtures/test/001_repo.rb
+8
-5
spec/models/project_spec.rb
spec/models/project_spec.rb
+1
-1
spec/monkeypatch.rb
spec/monkeypatch.rb
+1
-1
No files found.
db/fixtures/test/001_repo.rb
View file @
d7ea9052
# Clone repo
`cp spec/seed_project.tar.gz /tmp/`
Dir
.
chdir
(
"/tmp"
)
# Create dir for test repo
repo_dir
=
File
.
join
(
Rails
.
root
,
"tmp"
,
"tests"
)
Dir
.
mkdir
(
repo_dir
)
unless
File
.
exists?
(
repo_dir
)
`cp spec/seed_project.tar.gz tmp/tests/`
Dir
.
chdir
(
repo_dir
)
`tar -xf seed_project.tar.gz`
3
.
times
do
|
i
|
`cp -r
/tmp/legit/ /tmp/
legit_
#{
i
}
/`
puts
"Unpacked seed repo -
/tmp
/legit_
#{
i
}
"
`cp -r
legit/
legit_
#{
i
}
/`
puts
"Unpacked seed repo -
tmp/tests
/legit_
#{
i
}
"
end
spec/models/project_spec.rb
View file @
d7ea9052
...
...
@@ -38,7 +38,7 @@ describe Project do
it
"should return path to repo"
do
project
=
Project
.
new
(
:path
=>
"somewhere"
)
project
.
path_to_repo
.
should
==
"/tmp/somewhere"
project
.
path_to_repo
.
should
==
File
.
join
(
Rails
.
root
,
"tmp"
,
"tests"
,
"somewhere"
)
end
describe
:valid_repo?
do
...
...
spec/monkeypatch.rb
View file @
d7ea9052
...
...
@@ -10,7 +10,7 @@ class Project
end
def
path_to_repo
"/tmp/"
+
path
File
.
join
(
Rails
.
root
,
"tmp"
,
"tests"
,
path
)
end
end
...
...
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