2013-09-17 02:46:59 -04:00
|
|
|
Feature: Markdown support in Haml (Kramdown)
|
|
|
|
In order to test support of the Haml markdown filter
|
|
|
|
|
|
|
|
Scenario: Markdown filter in Haml works (with Kramdown)
|
|
|
|
Given a fixture app "markdown-in-haml-app"
|
|
|
|
And a file named "config.rb" with:
|
|
|
|
"""
|
|
|
|
set :markdown_engine, :kramdown
|
|
|
|
activate :directory_indexes
|
|
|
|
"""
|
|
|
|
And a file named "source/markdown_filter.html.haml" with:
|
|
|
|
"""
|
|
|
|
:markdown
|
|
|
|
# H1
|
|
|
|
|
|
|
|
paragraph
|
|
|
|
"""
|
|
|
|
Given the Server is running at "markdown-in-haml-app"
|
|
|
|
When I go to "/markdown_filter/"
|
2013-09-28 03:23:13 -04:00
|
|
|
Then I should see ">H1</h1>"
|
2013-09-17 02:46:59 -04:00
|
|
|
Then I should see "<p>paragraph</p>"
|
|
|
|
|
|
|
|
|
|
|
|
Scenario: Markdown filter in Haml uses our link_to and image_tag helpers (with Kramdown)
|
|
|
|
Given a fixture app "markdown-in-haml-app"
|
|
|
|
And a file named "config.rb" with:
|
|
|
|
"""
|
|
|
|
set :markdown_engine, :kramdown
|
|
|
|
activate :directory_indexes
|
|
|
|
"""
|
|
|
|
And a file named "source/link_and_image.html.haml" with:
|
|
|
|
"""
|
|
|
|
:markdown
|
|
|
|
[A link](/link_target.html)
|
|
|
|
|
2015-04-22 16:09:02 -04:00
|
|
|
![image](blank.gif){: srcset="image_2x.jpg 2x"}
|
2013-09-17 02:46:59 -04:00
|
|
|
"""
|
|
|
|
Given the Server is running at "markdown-in-haml-app"
|
|
|
|
When I go to "/link_and_image/"
|
|
|
|
Then I should see "/link_target/"
|
2015-04-22 16:09:02 -04:00
|
|
|
Then I should see "/images/image_2x.jpg 2x"
|
2013-09-17 02:46:59 -04:00
|
|
|
Then I should see 'src="/images/blank.gif"'
|