Going to figure out how to test background processes later

This commit is contained in:
Nick Quaranto 2009-04-01 20:19:26 -04:00
parent 4e302c0445
commit c52484a257
3 changed files with 4 additions and 31 deletions

View File

@ -19,11 +19,11 @@ Feature: Site configuration
And I should see "Changing destination directory" in "_mysite/index.html" And I should see "Changing destination directory" in "_mysite/index.html"
Scenario: Use RDiscount for markup Scenario: Use RDiscount for markup
Given I have an "index.html" file that contains "[Google](http://google.com)" Given I have an "index.markdown" page that contains "[Google](http://google.com)"
And I have a configuration file with "markdown" set to "rdiscount" And I have a configuration file with "markdown" set to "rdiscount"
When I run jekyll When I run jekyll
Then the _site directory should exist Then the _site directory should exist
And I should see "<a href='http://google.com/>Google</a>" in "_site/index.html" And I should see "<a href="http://google.com">Google</a>" in "_site/index.html"
Scenario: Use Maruku for markup Scenario: Use Maruku for markup
Given I have an "index.markdown" page that contains "[Google](http://google.com)" Given I have an "index.markdown" page that contains "[Google](http://google.com)"
@ -32,30 +32,6 @@ Feature: Site configuration
Then the _site directory should exist Then the _site directory should exist
And I should see "<a href='http://google.com'>Google</a>" in "_site/index.html" And I should see "<a href='http://google.com'>Google</a>" in "_site/index.html"
Scenario: Enable auto-regeneration
Given I have an "index.html" file that contains "My Awesome Site"
And I have a configuration file with "auto" set to "true"
When I run jekyll in the background
And I change "index.html" to contain "Auto-regenerate on!"
Then the _site directory should exist
And I should see "My Awesome Site" in "_site/index.html"
And I should see "Auto-regenerate on!" in "_site/index.html"
Scenario: Run server to host generated site
Given I have an "index.html" file that contains "WEBrick to the rescue"
And I have a configuration file with "server" set to "true"
When I run jekyll
And I go to "http://0.0.0.0:4000"
Then I should see "WEBrick to the rescue"
Scenario: Run server on a different server port
Given I have an "index.html" file that contains "Changing Port"
And I have a configuration file with "server" set to "true"
And I have a configuration file with "port" set to "1337"
When I run jekyll
And I go to "http://0.0.0.0:1337"
Then I should see "Changing Port"
Scenario: Use none permalink schema Scenario: Use none permalink schema
Given I have a _posts directory Given I have a _posts directory
And I have the following post: And I have the following post:

View File

@ -86,10 +86,6 @@ Given /^I have a configuration file with "(.*)" set to "(.*)"$/ do |key, value|
end end
end end
When /^I run jekyll in the background$/ do
run_jekyll(:bg => true)
end
When /^I run jekyll$/ do When /^I run jekyll$/ do
run_jekyll run_jekyll
end end

View File

@ -13,5 +13,6 @@ def run_jekyll(opts = {})
if opts[:bg] if opts[:bg]
bg = '&' bg = '&'
end end
system "#{JEKYLL_PATH} >> /dev/null #{bg}"
system "#{JEKYLL_PATH} >> /dev/null"
end end