Fix a bug in the command and added a test case for that feature.

This commit is contained in:
Chris Eppstein 2010-05-29 14:57:00 -07:00
parent 04d2a35ce5
commit 98e291fa2b
3 changed files with 21 additions and 1 deletions

View File

@ -236,7 +236,6 @@ Feature: Command Line
Then my css is validated
And I am informed that my css is valid.
@broken
Scenario: Get stats for my project
Given I am using the existing project in test/fixtures/stylesheets/compass
When I run: compass stats
@ -251,3 +250,9 @@ Feature: Command Line
| sass/utilities.sass | 2 | 0 | 0 | 2 | 5 | 11 |
| Total.* | 44 | 9 | 0 | 45 | 299 | 832 |
Scenario: List frameworks registered with compass
When I run: compass frameworks
Then I should see the following lines of output:
| blueprint |
| compass |

View File

@ -232,3 +232,6 @@ Then /^the image ([^ ]+) has a size of (\d+)x(\d+)$/ do |file, width, height|
IO.read(file)[0x10..0x18].unpack('NN').should == [width.to_i, height.to_i]
end
Then /^I should see the following lines of output:$/ do |table|
table.diff!([['blueprint'],['compass']])
end

View File

@ -13,9 +13,21 @@ module Compass
end
end
class << self
def option_parser(arguments)
parser = Compass::Exec::CommandOptionParser.new(arguments)
parser.extend(Compass::Exec::GlobalOptionsParser)
end
def usage
option_parser([]).to_s
end
def description(command)
"List the available frameworks"
end
def parse!(arguments)
parser = option_parser(arguments)
parser.parse!
parser.options
end
end
end
end