Adding rake task for features, removing pipe for filters and starting on step definitions

This commit is contained in:
Nick Quaranto 2009-03-31 07:28:47 -04:00
parent 937dad66a7
commit 778894dc6b
3 changed files with 54 additions and 10 deletions

View File

@ -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

View File

@ -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 | {{ '<tt>Mario & Luigi</tt>' | xml_escape }} |
| title | date | input | filter |
| Escape text for XML | 3/27/2009 | '<tt>Mario & Luigi</tt>' | xml_escape |
When I run jekyll
Then the _site directory should exist
And I should see "&lt;tt&gt;Mario &amp; Luigi&lt;tt&gt;" 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 "<b>Mr. Spock</b>" in "_site/2009/03/27/textilize.html"

View File

@ -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