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
61fe0a23
Commit
61fe0a23
authored
Apr 01, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed WikiPipeline and specs
parent
28266d9d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
lib/banzai/pipeline/wiki_pipeline.rb
lib/banzai/pipeline/wiki_pipeline.rb
+1
-1
spec/lib/banzai/pipeline/wiki_pipeline_spec.rb
spec/lib/banzai/pipeline/wiki_pipeline_spec.rb
+6
-3
No files found.
lib/banzai/pipeline/wiki_pipeline.rb
View file @
61fe0a23
...
@@ -4,7 +4,7 @@ module Banzai
...
@@ -4,7 +4,7 @@ module Banzai
def
self
.
filters
def
self
.
filters
@filters
||=
begin
@filters
||=
begin
super
.
insert_after
(
Filter
::
TableOfContentsFilter
,
Filter
::
GollumTagsFilter
)
super
.
insert_after
(
Filter
::
TableOfContentsFilter
,
Filter
::
GollumTagsFilter
)
.
insert_after
(
Filter
::
GollumTag
sFilter
,
Filter
::
WikiLinkFilter
)
.
insert_after
(
Filter
::
TableOfContent
sFilter
,
Filter
::
WikiLinkFilter
)
end
end
end
end
end
end
...
...
spec/lib/banzai/pipeline/wiki_pipeline_spec.rb
View file @
61fe0a23
require
'rails_helper'
require
'rails_helper'
describe
Banzai
::
Pipeline
::
WikiPipeline
do
describe
Banzai
::
Pipeline
::
WikiPipeline
do
let
(
:project_wiki
)
{
double
}
before
(
:each
)
{
allow
(
project_wiki
).
to
receive
(
:wiki_base_path
)
{
'/some/repo/wikis'
}
}
describe
'TableOfContents'
do
describe
'TableOfContents'
do
it
'replaces the tag with the TableOfContentsFilter result'
do
it
'replaces the tag with the TableOfContentsFilter result'
do
markdown
=
<<-
MD
.
strip_heredoc
markdown
=
<<-
MD
.
strip_heredoc
...
@@ -11,7 +14,7 @@ describe Banzai::Pipeline::WikiPipeline do
...
@@ -11,7 +14,7 @@ describe Banzai::Pipeline::WikiPipeline do
Foo
Foo
MD
MD
result
=
described_class
.
call
(
markdown
,
project:
spy
,
project_wiki:
double
)
result
=
described_class
.
call
(
markdown
,
project:
spy
,
project_wiki:
project_wiki
)
aggregate_failures
do
aggregate_failures
do
expect
(
result
[
:output
].
text
).
not_to
include
'[['
expect
(
result
[
:output
].
text
).
not_to
include
'[['
...
@@ -29,7 +32,7 @@ describe Banzai::Pipeline::WikiPipeline do
...
@@ -29,7 +32,7 @@ describe Banzai::Pipeline::WikiPipeline do
Foo
Foo
MD
MD
output
=
described_class
.
to_html
(
markdown
,
project:
spy
,
project_wiki:
double
)
output
=
described_class
.
to_html
(
markdown
,
project:
spy
,
project_wiki:
project_wiki
)
expect
(
output
).
to
include
(
'[[<em>toc</em>]]'
)
expect
(
output
).
to
include
(
'[[<em>toc</em>]]'
)
end
end
...
@@ -42,7 +45,7 @@ describe Banzai::Pipeline::WikiPipeline do
...
@@ -42,7 +45,7 @@ describe Banzai::Pipeline::WikiPipeline do
Foo
Foo
MD
MD
output
=
described_class
.
to_html
(
markdown
,
project:
spy
,
project_wiki:
double
)
output
=
described_class
.
to_html
(
markdown
,
project:
spy
,
project_wiki:
project_wiki
)
aggregate_failures
do
aggregate_failures
do
expect
(
output
).
not_to
include
(
'<ul>'
)
expect
(
output
).
not_to
include
(
'<ul>'
)
...
...
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