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
58dad2b9
Commit
58dad2b9
authored
Oct 04, 2012
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove leftover ref_extractor_spec file
Apparently it didn't get removed after the rename to ExtractsPath.
parent
3606a148
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
58 deletions
+0
-58
spec/lib/ref_extractor_spec.rb
spec/lib/ref_extractor_spec.rb
+0
-58
No files found.
spec/lib/ref_extractor_spec.rb
deleted
100644 → 0
View file @
3606a148
require
'spec_helper'
describe
ExtractsPath
do
include
ExtractsPath
let
(
:project
)
{
double
(
'project'
)
}
before
do
@project
=
project
project
.
stub
(
:branches
).
and_return
([
'master'
,
'foo/bar/baz'
])
project
.
stub
(
:tags
).
and_return
([
'v1.0.0'
,
'v2.0.0'
])
end
describe
'#extract_ref'
do
it
"returns an empty pair when no @project is set"
do
@project
=
nil
extract_ref
(
'master/CHANGELOG'
).
should
==
[
''
,
''
]
end
context
"without a path"
do
it
"extracts a valid branch"
do
extract_ref
(
'master'
).
should
==
[
'master'
,
''
]
end
it
"extracts a valid tag"
do
extract_ref
(
'v2.0.0'
).
should
==
[
'v2.0.0'
,
''
]
end
it
"extracts a valid commit ref without a path"
do
extract_ref
(
'f4b14494ef6abf3d144c28e4af0c20143383e062'
).
should
==
[
'f4b14494ef6abf3d144c28e4af0c20143383e062'
,
''
]
end
it
"falls back to a primitive split for an invalid ref"
do
extract_ref
(
'stable'
).
should
==
[
'stable'
,
''
]
end
end
context
"with a path"
do
it
"extracts a valid branch"
do
extract_ref
(
'foo/bar/baz/CHANGELOG'
).
should
==
[
'foo/bar/baz'
,
'CHANGELOG'
]
end
it
"extracts a valid tag"
do
extract_ref
(
'v2.0.0/CHANGELOG'
).
should
==
[
'v2.0.0'
,
'CHANGELOG'
]
end
it
"extracts a valid commit SHA"
do
extract_ref
(
'f4b14494ef6abf3d144c28e4af0c20143383e062/CHANGELOG'
).
should
==
[
'f4b14494ef6abf3d144c28e4af0c20143383e062'
,
'CHANGELOG'
]
end
it
"falls back to a primitive split for an invalid ref"
do
extract_ref
(
'stable/CHANGELOG'
).
should
==
[
'stable'
,
'CHANGELOG'
]
end
end
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