From ce3fa7fd0239f8eceafe21f17e9da9074f1904da Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 8 Jun 2013 19:49:39 +0200 Subject: [PATCH] Add feature to test new functionality. --- features/pagination.feature | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/features/pagination.feature b/features/pagination.feature index 4259caf1..76c62361 100644 --- a/features/pagination.feature +++ b/features/pagination.feature @@ -52,3 +52,31 @@ Feature: Site pagination | 2 | 1 | 5 | | 3 | 1 | 6 | | 4 | 1 | 7 | + + Scenario Outline: Setting a custom pagination path without an index.html in it + Given I have a configuration file with: + | key | value | + | paginate | 1 | + | paginate_path | /blog/page/:num | + | permalink | /blog/:year/:month/:day/:title | + And I have a blog directory + And I have an "blog/index.html" page that contains "{{ paginator.posts.size }}" + And I have an "index.html" page that contains "Don't pick me!" + And I have a _posts directory + And I have the following posts: + | title | date | layout | content | + | Wargames | 2009-03-27 | default | The only winning move is not to play. | + | Wargames2 | 2009-04-27 | default | The only winning move is not to play2. | + | Wargames3 | 2009-05-27 | default | The only winning move is not to play3. | + | Wargames4 | 2009-06-27 | default | The only winning move is not to play4. | + When I run jekyll + Then the _site/blog/page/ directory should exist + And the "_site/blog/page//index.html" file should exist + And I should see "" in "_site/blog/page//index.html" + And the "_site/blog/page//index.html" file should not exist + + Examples: + | exist | posts | not_exist | + | 2 | 1 | 5 | + | 3 | 1 | 6 | + | 4 | 1 | 7 |