2011-05-30 15:17:28 +00:00
|
|
|
require 'test_helper'
|
|
|
|
require 'compass'
|
|
|
|
|
|
|
|
class ActionsTest < Test::Unit::TestCase
|
|
|
|
class BaseActionExtender
|
|
|
|
include Compass::Actions
|
|
|
|
def options
|
|
|
|
@@options ||= {}
|
|
|
|
end
|
|
|
|
def working_path
|
|
|
|
"/tmp"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# When log4r is included, it sometimes breaks the Actions
|
2011-12-10 17:49:34 +00:00
|
|
|
test "test_quiet_option" do
|
2011-05-30 15:17:28 +00:00
|
|
|
b = BaseActionExtender.new
|
|
|
|
b.logger = ""
|
|
|
|
b.options[:quiet] = true
|
|
|
|
|
|
|
|
# logger shouldn't be called... if it is, this will error
|
|
|
|
b.directory("/tmp/#{(rand * 1000000).to_i}")
|
|
|
|
end
|
|
|
|
end
|