Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add specs to test permalink summary truncation #389

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions features/summary.feature
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
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:
"""
<p>Summary from article with separator.
</p>
"""
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 "<p>Summary from article with no separator.</p>"
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"
Expand All @@ -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"
Expand All @@ -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 "<!--more-->"
Then I should not see "Summary from article with HTML comment separator."

Scenario: Using a custom summary generator
Given a fixture app "summary-app"
Expand Down
6 changes: 6 additions & 0 deletions fixtures/summary-app/source/layout.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!doctype html>
<html>
<body>
<%= yield %>
</body>
</html>
Loading