Permalink
Browse files

Added features to default rake task, and post data feature all green

  • Loading branch information...
1 parent 03f511b commit 3c0bc3b2de7a87b82344b5041d87a3753d607bf9 @qrush qrush committed Apr 1, 2009
Showing with 6 additions and 3 deletions.
  1. +1 −1 Rakefile
  2. +3 −0 features/post_data.feature
  3. +2 −2 features/step_definitions/jekyll_steps.rb
View
@@ -47,7 +47,7 @@ begin
rescue LoadError
end
-task :default => :test
+task :default => [:test, :features]
# console
@@ -120,15 +120,18 @@ Feature: Post data
Scenario: Disable a post from being published
Given I have a _posts directory
+ And I have an "index.html" file that contains "Published!"
And I have the following post:
| title | date | layout | published | content |
| Star Wars | 3/27/2009 | simple | false | Luke, I am your father. |
When I run jekyll
Then the _site directory should exist
And the "_site/2009/03/27/star-wars.html" file should not exist
+ And I should see "Published!" in "_site/index.html"
Scenario: Use a custom variable
Given I have a _posts directory
+ And I have a _layouts directory
And I have the following post:
| title | date | layout | author | content |
| Star Wars | 3/27/2009 | simple | Darth Vader | Luke, I am your father. |
@@ -53,7 +53,7 @@
path = File.join(before || '.', '_posts', after || '.', "#{date}-#{title}.#{post['type'] || 'textile'}")
matter_hash = {}
- %w(title layout tags category categories).each do |key|
+ %w(title layout tags category categories published author).each do |key|
matter_hash[key] = post[key] if post[key]
end
matter = matter_hash.map { |k, v| "#{k}: #{v}\n" }.join.chomp
@@ -100,7 +100,7 @@
end
Then /^the "(.*)" file should not exist$/ do |file|
- pending
+ assert !File.exists?(file)
end
Then /^I should see today's date in "(.*)"$/ do |file|

0 comments on commit 3c0bc3b

Please sign in to comment.