From b234deb5406379cc07c951a57d0479ecceeb0cf9 Mon Sep 17 00:00:00 2001 From: Moritz Breit Date: Sun, 14 Apr 2013 21:28:35 +0200 Subject: [PATCH] Add cucumber scenarios for markdown pages with erb layout These are tests for middleman/middleman#860. --- middleman-core/features/markdown.feature | 12 +++++++++++- .../fixtures/markdown-app/source/layouts/layout.erb | 13 +++++++++++++ .../markdown-app/source/with_layout.markdown | 4 ++++ .../source/with_layout_erb.markdown.erb | 4 ++++ 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 middleman-more/fixtures/markdown-app/source/layouts/layout.erb create mode 100644 middleman-more/fixtures/markdown-app/source/with_layout.markdown create mode 100644 middleman-more/fixtures/markdown-app/source/with_layout_erb.markdown.erb diff --git a/middleman-core/features/markdown.feature b/middleman-core/features/markdown.feature index b9cc0b23..906e8e30 100644 --- a/middleman-core/features/markdown.feature +++ b/middleman-core/features/markdown.feature @@ -10,4 +10,14 @@ Feature: Markdown support Scenario: Markdown extensions (Maruku) Given the Server is running at "markdown-app" When I go to "/smarty_pants.html" - Then I should see "“Hello”" \ No newline at end of file + Then I should see "“Hello”" + + Scenario: Links with block syntax in ERB layout erb + Given the Server is running at "markdown-app" + When I go to "/with_layout_erb.html" + Then I should see '' + + Scenario: Links with block syntax in ERB layout + Given the Server is running at "markdown-app" + When I go to "/with_layout.html" + Then I should see '' diff --git a/middleman-more/fixtures/markdown-app/source/layouts/layout.erb b/middleman-more/fixtures/markdown-app/source/layouts/layout.erb new file mode 100644 index 00000000..fbd4725c --- /dev/null +++ b/middleman-more/fixtures/markdown-app/source/layouts/layout.erb @@ -0,0 +1,13 @@ + + + My Sample Site + + + + <%= yield %> + + <% link_to "layout_block_link.html" do %> + Block link text + <% end %> + + diff --git a/middleman-more/fixtures/markdown-app/source/with_layout.markdown b/middleman-more/fixtures/markdown-app/source/with_layout.markdown new file mode 100644 index 00000000..9d3cf532 --- /dev/null +++ b/middleman-more/fixtures/markdown-app/source/with_layout.markdown @@ -0,0 +1,4 @@ +--- +layout: layout +--- +Hello World diff --git a/middleman-more/fixtures/markdown-app/source/with_layout_erb.markdown.erb b/middleman-more/fixtures/markdown-app/source/with_layout_erb.markdown.erb new file mode 100644 index 00000000..9d3cf532 --- /dev/null +++ b/middleman-more/fixtures/markdown-app/source/with_layout_erb.markdown.erb @@ -0,0 +1,4 @@ +--- +layout: layout +--- +Hello World