mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
4fe0732713
* 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.
55 lines
1.8 KiB
Gherkin
55 lines
1.8 KiB
Gherkin
Feature: Markdown (Kramdown) support
|
|
In order to test included Kramdown support
|
|
|
|
Scenario: Kramdown smartypants extension
|
|
Given a fixture app "markdown-app"
|
|
And a file named "config.rb" with:
|
|
"""
|
|
set :markdown_engine, :kramdown
|
|
set :markdown, smartypants: true
|
|
"""
|
|
Given the Server is running
|
|
When I go to "/smarty_pants.html"
|
|
Then I should see "“Hello”"
|
|
|
|
Scenario: Kramdown uses our link_to and image_tag helpers
|
|
Given a fixture app "markdown-app"
|
|
And a file named "config.rb" with:
|
|
"""
|
|
set :markdown_engine, :kramdown
|
|
activate :automatic_image_sizes
|
|
activate :directory_indexes
|
|
"""
|
|
And a file named "source/link_and_image.html.markdown" with:
|
|
"""
|
|
[A link](/smarty_pants.html)
|
|
|
|
![image](blank.gif)
|
|
|
|
[mail@mail.com](mailto:mail@mail.com)
|
|
"""
|
|
Given the Server is running
|
|
When I go to "/link_and_image/"
|
|
Then I should see "/smarty_pants/"
|
|
Then I should see 'width="1"'
|
|
And I should see 'height="1"'
|
|
And I should see 'src="/images/blank.gif"'
|
|
And I should see 'src="/images/blank.gif"'
|
|
And I should see "mail@mail.com"
|
|
|
|
Scenario: Kramdown uses our link_to with options parameter
|
|
Given a fixture app "markdown-app"
|
|
And a file named "config.rb" with:
|
|
"""
|
|
set :markdown_engine, :kramdown
|
|
activate :directory_indexes
|
|
"""
|
|
And a file named "source/links.html.markdown" with:
|
|
"""
|
|
[A link](/smarty_pants.html)
|
|
[A second link](/smarty_pants.html){: anchor="test-anchor"}
|
|
"""
|
|
Given the Server is running
|
|
When I go to "/links/"
|
|
Then I should see "/smarty_pants/"
|
|
And I should see "/smarty_pants/#test-anchor"
|