BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
wiki_pipeline.rb
lib/banzai/pipeline/wiki_pipeline.rb
+1
-1
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
def
self
.
filters
@filters
||=
begin
super
.
insert_after
(
Filter
::
TableOfContentsFilter
,
Filter
::
GollumTagsFilter
)
.
insert_after
(
Filter
::
GollumTag
sFilter
,
Filter
::
WikiLinkFilter
)
.
insert_after
(
Filter
::
TableOfContent
sFilter
,
Filter
::
WikiLinkFilter
)
end
end
end
...
...
spec/lib/banzai/pipeline/wiki_pipeline_spec.rb
View file @
61fe0a23
require
'rails_helper'
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
it
'replaces the tag with the TableOfContentsFilter result'
do
markdown
=
<<-
MD
.
strip_heredoc
...
...
@@ -11,7 +14,7 @@ describe Banzai::Pipeline::WikiPipeline do
Foo
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
expect
(
result
[
:output
].
text
).
not_to
include
'[['
...
...
@@ -29,7 +32,7 @@ describe Banzai::Pipeline::WikiPipeline do
Foo
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>]]'
)
end
...
...
@@ -42,7 +45,7 @@ describe Banzai::Pipeline::WikiPipeline do
Foo
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
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