compass/test/units/actions_test.rb
Hampton Catlin 3bf3ddac72 Following a similar API to how the Complier works, don't log
anything (don't even load up the logger!) if we pass in the :quiet option.

I need this because of some conflicts with Compass::Logger, being referred
to as "Logger", which seemed to be pulling out the main Logger. This is a
seperate issue, but making this options[:quiet] API functional is a nice
work-around that keeps things from getting too messy.

Tests included, obviously.
2011-05-30 16:17:28 +01:00

24 lines
519 B
Ruby

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
def test_quiet_option
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