From 61264714bd67816f3a431fbb2386f4eedfec2623 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 24 Oct 2009 17:46:59 -0700 Subject: [PATCH] Scenarios for the help subcommand. --- features/command_line.feature | 11 +++++++++++ features/step_definitions/command_line_steps.rb | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/features/command_line.feature b/features/command_line.feature index 6b121b7b..2e36d081 100644 --- a/features/command_line.feature +++ b/features/command_line.feature @@ -110,6 +110,17 @@ Feature: Command Line And a sass file sass/reset.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 Given I am using the existing project in test/fixtures/stylesheets/compass When I run: compass compile diff --git a/features/step_definitions/command_line_steps.rb b/features/step_definitions/command_line_steps.rb index 4bba5f5c..0c5d86f6 100644 --- a/features/step_definitions/command_line_steps.rb +++ b/features/step_definitions/command_line_steps.rb @@ -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:/ 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