diff --git a/Rakefile b/Rakefile
index 0d743cfc..d3e5656f 100644
--- a/Rakefile
+++ b/Rakefile
@@ -72,3 +72,16 @@ namespace :convert do
sh %q(ruby -r './lib/jekyll/converters/typo' -e 'Jekyll::Typo.process("#{ENV["DB"]}", "#{ENV["USER"]}", "#{ENV["PASS"]}")')
end
end
+
+begin
+ require 'cucumber/rake/task'
+
+ Cucumber::Rake::Task.new(:features) do |t|
+ t.cucumber_opts = "--format pretty"
+ end
+rescue LoadError
+ desc 'Cucumber rake task not available'
+ task :features do
+ abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
+ end
+end
diff --git a/features/embed_filters.feature b/features/embed_filters.feature
index 33429d12..b5eca2df 100644
--- a/features/embed_filters.feature
+++ b/features/embed_filters.feature
@@ -7,8 +7,8 @@ Feature: Embed filters
Given I have a blank site
And I have a _posts directory
And I have the following post:
- | title | date | content |
- | Date to XML schema | 3/27/2009 | {{ post.date | date_to_xmlschema }} |
+ | title | date | input | filter |
+ | Date to XML schema | 3/27/2009 | post.date | date_to_xmlschema |
When I run jekyll
Then the _site directory should exist
And I should see "2009-03-27T00:00:00-08:00" in "_site/2009/03/27/date-to-xml-schema.html"
@@ -17,8 +17,8 @@ Feature: Embed filters
Given I have a blank site
And I have a _posts directory
And I have the following post:
- | title | date | content |
- | Escape text for XML | 3/27/2009 | {{ 'Mario & Luigi' | xml_escape }} |
+ | title | date | input | filter |
+ | Escape text for XML | 3/27/2009 | 'Mario & Luigi' | xml_escape |
When I run jekyll
Then the _site directory should exist
And I should see "<tt>Mario & Luigi<tt>" in "_site/2009/03/27/escape-text-for-xml.html"
@@ -27,8 +27,8 @@ Feature: Embed filters
Given I have a blank site
And I have a _posts directory
And I have the following post:
- | title | date | content |
- | Calculate number of words | 3/27/2009 | {{ post.title | number_of_words }} |
+ | title | date | input | filter |
+ | Calculate number of words | 3/27/2009 | post.title | number_of_words |
When I run jekyll
Then the _site directory should exist
And I should see "4" in "_site/2009/03/27/calculate-number-of-words.html"
@@ -37,8 +37,8 @@ Feature: Embed filters
Given I have a blank site
And I have a _posts directory
And I have the following post:
- | title | date | tags | content |
- | Convert array to sentence | 3/27/2009 | life hacks code | {{ post.tags | array_to_sentence_string }} |
+ | title | date | tags | input | filter |
+ | Convert array to sentence | 3/27/2009 | life hacks code | post.tags | array_to_sentence_string |
When I run jekyll
Then the _site directory should exist
And I should see "life, hacks, and code" in "_site/2009/03/27/convert-array-to-sentence.html"
@@ -47,8 +47,8 @@ Feature: Embed filters
Given I have a blank site
And I have a _posts directory
And I have the following post:
- | title | date | tags | content |
- | Logical Awesome | 3/27/2009 | *Mr. Spock* | {{ post.author | textilize }} |
+ | title | date | tags | input | filter |
+ | Logical Awesome | 3/27/2009 | *Mr. Spock* | post.author | textilize |
When I run jekyll
Then the _site directory should exist
And I should see "Mr. Spock" in "_site/2009/03/27/textilize.html"
diff --git a/features/step_definitions/jekyll_steps.rb b/features/step_definitions/jekyll_steps.rb
new file mode 100644
index 00000000..65a18048
--- /dev/null
+++ b/features/step_definitions/jekyll_steps.rb
@@ -0,0 +1,31 @@
+Given /^I have a blank site$/ do
+ pending
+end
+
+Given /^I have an "(.*)" file( with a "(.*)" layout)? that contains "(.*)"$/ do |file, layout, text|
+ pending
+end
+
+Given /^I have a (.*) layout that contains "(.*)"$/ do |layout, text|
+ pending
+end
+
+Given /^I have a (.*) directory$/ do |dir|
+ pending
+end
+
+Given /^I have the following post:$/ do |table|
+ pending
+end
+
+When /^I run jekyll$/ do
+ pending
+end
+
+Then /^the (.*) directory should exist$/ do |dir|
+ pending
+end
+
+Then /^I should see "(.*)" in "(.*)"$/ do |text, file|
+ pending
+end