1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00
middleman--middleman/middleman-core/features/markdown_redcarpet_in_haml.feature
Paul McMahon 4fe0732713
Cleanup of how fixtures customize a fixture (#2342)
* Use "Given" instead of "And" as first scenario step

* Remove unnecessary step

The following step already invokes this step

* Remove setup in feature that doesn't do anything

As this referenced "i18n-test-app", but later we run
"i18n-mixed-sources", these steps weren't doing anything.

* Avoid referencing the same fixture twice

The step "the Server is running at" invokes the "a fixture app" step,
followed by "the Server is running" step.
2020-06-15 11:19:39 -07:00

41 lines
1.1 KiB
Gherkin

Feature: Markdown support in Haml
In order to test support of the Haml markdown filter
Scenario: Markdown filter in Haml works
Given a fixture app "markdown-in-haml-app"
And a file named "config.rb" with:
"""
set :markdown_engine, :redcarpet
activate :directory_indexes
"""
And a file named "source/markdown_filter.html.haml" with:
"""
:markdown
# H1
paragraph
"""
Given the Server is running
When I go to "/markdown_filter/"
Then I should see ">H1</h1>"
Then I should see "<p>paragraph</p>"
Scenario: Markdown filter in Haml uses our link_to and image_tag helpers
Given a fixture app "markdown-in-haml-app"
And a file named "config.rb" with:
"""
set :markdown_engine, :redcarpet
activate :directory_indexes
"""
And a file named "source/link_and_image.html.haml" with:
"""
:markdown
[A link](/link_target.html)
![image](blank.gif)
"""
Given the Server is running
When I go to "/link_and_image/"
Then I should see "/link_target/"
Then I should see 'src="/images/blank.gif"'