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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
d1938fae
Commit
d1938fae
authored
Jan 19, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing specs
parent
5c7259c7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
spec/lib/gitlab/highlight_spec.rb
spec/lib/gitlab/highlight_spec.rb
+21
-0
No files found.
spec/lib/gitlab/highlight_spec.rb
0 → 100644
View file @
d1938fae
require
'spec_helper'
describe
Gitlab
::
Highlight
,
lib:
true
do
include
RepoHelpers
let
(
:project
)
{
create
(
:project
)
}
let
(
:commit
)
{
project
.
commit
(
sample_commit
.
id
)
}
describe
'.highlight_lines'
do
let
(
:lines
)
do
Gitlab
::
Highlight
.
highlight_lines
(
project
.
repository
,
commit
.
id
,
'files/ruby/popen.rb'
)
end
it
'should properly highlight all the lines'
do
expect
(
lines
[
4
]).
to
eq
(
%Q{<span id="LC5" class="line"> <span class="kp">extend</span> <span class="nb">self</span></span>
\n
}
)
expect
(
lines
[
21
]).
to
eq
(
%Q{<span id="LC22" class="line"> <span class="k">unless</span> <span class="no">File</span><span class="p">.</span><span class="nf">directory?</span><span class="p">(</span><span class="n">path</span><span class="p">)</span></span>
\n
}
)
expect
(
lines
[
26
]).
to
eq
(
%Q{<span id="LC27" class="line"> <span class="vi">@cmd_status</span> <span class="o">=</span> <span class="mi">0</span></span>
\n
}
)
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