2013-09-17 02:46:59 -04:00
|
|
|
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
|
2014-05-26 20:58:35 -04:00
|
|
|
set :markdown, smartypants: true
|
2013-09-17 02:46:59 -04:00
|
|
|
"""
|
|
|
|
Given the Server is running at "markdown-app"
|
|
|
|
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)
|
|
|
|
|
2013-11-13 22:46:06 -05:00
|
|
|
[mail@mail.com](mailto:mail@mail.com)
|
2013-09-17 02:46:59 -04:00
|
|
|
"""
|
|
|
|
Given the Server is running at "markdown-app"
|
|
|
|
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"'
|
2013-10-30 12:18:25 -04:00
|
|
|
And I should see 'src="/images/blank.gif"'
|
|
|
|
And I should see "mail@mail.com"
|
2019-08-09 14:00:15 -04:00
|
|
|
|
|
|
|
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 at "markdown-app"
|
|
|
|
When I go to "/links/"
|
|
|
|
Then I should see "/smarty_pants/"
|
|
|
|
And I should see "/smarty_pants/#test-anchor"
|