All commands must implement execute now.

This commit is contained in:
Chris Eppstein 2009-04-07 00:11:54 -07:00
parent 591bd882bf
commit 559b981015
3 changed files with 16 additions and 2 deletions

View File

@ -6,7 +6,7 @@ module Compass
self.options = options
end
def perform
def execute
Compass::Frameworks::ALL.each do |framework|
puts framework.name
end

View File

@ -6,7 +6,7 @@ module Compass
self.options = options
end
def perform
def execute
if options[:quiet]
# The quiet option may make scripting easier
puts ::Compass.version[:string]

View File

@ -11,6 +11,20 @@ class CommandLineTest < Test::Unit::TestCase
Compass.configuration.reset!
end
def test_print_version
compass "-vq"
assert_match /\d+\.\d+\.\d+( [0-9a-f]+)?/, @last_result
end
def test_list_frameworks
compass "--list-frameworks"
assert_equal(<<-FRAMEWORKS, @last_result)
blueprint
compass
yui
FRAMEWORKS
end
def test_basic_install
within_tmp_directory do
compass "basic"