From 34eb56a47e9666e73f2bfa8702936bca773fa45f Mon Sep 17 00:00:00 2001 From: Ryan Snodgrass Date: Wed, 18 Dec 2024 10:39:12 -0500 Subject: [PATCH] Add new specs to test permalink summary truncation --- features/summary.feature | 23 +++++++++++++++++++++-- fixtures/summary-app/source/layout.erb | 6 ++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 fixtures/summary-app/source/layout.erb diff --git a/features/summary.feature b/features/summary.feature index 1506253..f1c5b3d 100644 --- a/features/summary.feature +++ b/features/summary.feature @@ -1,5 +1,5 @@ Feature: Article summary generation - Scenario: Article has no summary separator + Scenario: Article has standard summary separator Given the Server is running at "summary-app" When I go to "/index.html" Then I should see: @@ -7,9 +7,20 @@ Feature: Article summary generation

Summary from article with separator.

""" - Then I should not see "Extended part from article with separator." + And I should not see "Extended part from article with separator." + When I go to "/2011/01/01/article-with-standard-summary-separator.html" + Then I should see "Extended part from article with separator." + And I should not see "READMORE" + And I should not see "Summary from article with separator." + + Scenario: Article has no summary separator + Given the Server is running at "summary-app" + When I go to "/index.html" Then I should see "

Summary from article with no separator.

" Then I should not see "Extended part from article with no separator." + When I go to "/2012/06/19/article-with-no-summary-separator.html" + And I should see "Summary from article with no separator." + Then I should see "Extended part from article with no separator." Scenario: Article has custom summary separator Given a fixture app "summary-app" @@ -28,6 +39,10 @@ Feature: Article summary generation """ Then I should not see "Extended part from article with custom separator." Then I should see "Extended part from article with separator." + When I go to "/2013/05/08/article-with-custom-separator.html" + And I should see "Extended part from article with custom separator." + Then I should not see "SPLIT_SUMMARY_BEFORE_THIS" + Then I should not see "Summary from article with custom separator." Scenario: Article has custom summary separator that's an HTML comment Given a fixture app "summary-app" @@ -46,6 +61,10 @@ Feature: Article summary generation """ Then I should not see "Extended part from article with HTML comment separator." Then I should see "Extended part from article with separator." + When I go to "/2016/05/21/article-with-comment-separator.html" + And I should see "Extended part from article with HTML comment separator." + Then I should not see "" + Then I should not see "Summary from article with HTML comment separator." Scenario: Using a custom summary generator Given a fixture app "summary-app" diff --git a/fixtures/summary-app/source/layout.erb b/fixtures/summary-app/source/layout.erb new file mode 100644 index 0000000..3b82a58 --- /dev/null +++ b/fixtures/summary-app/source/layout.erb @@ -0,0 +1,6 @@ + + + + <%= yield %> + +