diff --git a/features/post_data.feature b/features/post_data.feature index 87f5d851..9cd9d507 100644 --- a/features/post_data.feature +++ b/features/post_data.feature @@ -82,17 +82,17 @@ Feature: Post data And I should see "Post tags: twist" in "_site/2009/05/18/star-wars.html" Scenario: Use post.categories variable when categories are in folders - Given I have a movies directory - And I have a movies/scifi directory - And I have a movies/scifi/_posts directory + Given I have a scifi directory + And I have a scifi/movies directory + And I have a scifi/movies/_posts directory And I have a _layouts directory - And I have the following post in "movies/scifi": + And I have the following post in "scifi/movies": | title | date | layout | content | | Star Wars | 3/27/2009 | simple | Luke, I am your father. | And I have a simple layout that contains "Post categories: {{ site.posts.first.categories | array_to_sentence_string }}" When I run jekyll Then the _site directory should exist - And I should see "Post categories: movies and scifi" in "_site/movies/scifi/2009/03/27/star-wars.html" + And I should see "Post categories: scifi and movies" in "_site/scifi/movies/2009/03/27/star-wars.html" Scenario: Use post.categories variable when category is in YAML Given I have a _posts directory @@ -110,11 +110,11 @@ Feature: Post data And I have a _layouts directory And I have the following post: | title | date | layout | categories | content | - | Star Wars | 3/27/2009 | simple | ['movies', 'scifi'] | Luke, I am your father. | + | Star Wars | 3/27/2009 | simple | ['scifi', 'movies'] | Luke, I am your father. | And I have a simple layout that contains "Post categories: {{ site.posts.first.categories | array_to_sentence_string }}" When I run jekyll Then the _site directory should exist - And I should see "Post categories: movies and scifi" in "_site/movies/scifi/2009/03/27/star-wars.html" + And I should see "Post categories: scifi and movies" in "_site/scifi/movies/2009/03/27/star-wars.html" Scenario: Disable a post from being published Given I have a _posts directory diff --git a/test/test_post.rb b/test/test_post.rb index b6585cc0..491a42a0 100644 --- a/test/test_post.rb +++ b/test/test_post.rb @@ -105,7 +105,7 @@ class TestPost < Test::Unit::TestCase should "process the url correctly" do assert_equal "/:categories/:year/:month/:day/:title.html", @post.template - assert_equal "/beer/food/2008/10/19/foo-bar.html", @post.url + assert_equal "/food/beer/2008/10/19/foo-bar.html", @post.url end end