Scenarios for the help subcommand.

This commit is contained in:
Chris Eppstein 2009-10-24 17:46:59 -07:00
parent c8df3f3c42
commit 61264714bd
2 changed files with 17 additions and 0 deletions

View File

@ -110,6 +110,17 @@ Feature: Command Line
And a sass file sass/reset.sass is reported unchanged And a sass file sass/reset.sass is reported unchanged
And a sass file sass/utilities.sass is reported unchanged And a sass file sass/utilities.sass is reported unchanged
Scenario: Basic help
When I run: compass help
Then I should be shown a list of available commands
And the list of commands should describe the compile command
And the list of commands should describe the create command
And the list of commands should describe the grid-img command
And the list of commands should describe the help command
And the list of commands should describe the init command
And the list of commands should describe the install command
And the list of commands should describe the version command
Scenario: Recompiling a project with no material changes Scenario: Recompiling a project with no material changes
Given I am using the existing project in test/fixtures/stylesheets/compass Given I am using the existing project in test/fixtures/stylesheets/compass
When I run: compass compile When I run: compass compile

View File

@ -104,5 +104,11 @@ Then /^I am told how to compile my sass stylesheets$/ do
@last_result.should =~ /You must compile your sass stylesheets into CSS when they change.\nThis can be done in one of the following ways:/ @last_result.should =~ /You must compile your sass stylesheets into CSS when they change.\nThis can be done in one of the following ways:/
end end
Then /^I should be shown a list of available commands$/ do
@last_result.should =~ /^Available commands:$/
end
Then /^the list of commands should describe the ([^ ]+) command$/ do |command|
@last_result.should =~ /^\s+\* #{command}\s+- [A-Z].+$/
end end