Permalink
Browse files

Add cucumber test

  • Loading branch information...
1 parent d938909 commit f2bd0d70812ce775f006bea28dfdef1c7a7660ca @goodtouch committed with May 28, 2013
Showing with 14 additions and 1 deletion.
  1. +13 −0 features/site_data.feature
  2. +1 −1 features/step_definitions/jekyll_steps.rb
View
@@ -79,6 +79,19 @@ Feature: Site data
Then the _site directory should exist
And I should see "Yuengling" in "_site/index.html"
+ Scenario: Use the custom site.projects classification variable
+ Given I have a _posts directory
+ And I have an "index.html" page that contains "{% for post in site.projects.bartender %} {{ post.content }} {% endfor %}"
+ And I have a configuration file with "classifications" set to:
+ | value |
+ | projects |
+ And I have the following posts:
+ | title | date | project | content |
+ | Beer List | 2009-03-26 | bartender | Our most famous beverages |
+ When I run jekyll
+ Then the _site directory should exist
+ And I should see "Our most famous beverages" in "_site/index.html"
+
Scenario: Order Posts by name when on the same date
Given I have a _posts directory
And I have an "index.html" page that contains "{% for post in site.posts %}{{ post.title }}:{{ post.previous.title}},{{ post.next.title}} {% endfor %}"
@@ -71,7 +71,7 @@
path = File.join(before, folder_post, after, filename)
matter_hash = {}
- %w(title layout tag tags category categories published author path date permalink).each do |key|
+ %w(title layout tag tags category categories project projects published author path date permalink).each do |key|
matter_hash[key] = post[key] if post[key]
end
matter = matter_hash.map { |k, v| "#{k}: #{v}\n" }.join.chomp

0 comments on commit f2bd0d7

Please sign in to comment.