Sha256: d351201c862d3ee584ed1e84fcda21e18c7506db84024293ab38f60472c71dc0

Contents?: true

Size: 1.14 KB

Versions: 19

Compression:

Stored size: 1.14 KB

Contents

require 'test_helper'
require 'compass'

class WatcherCompilerTest < Test::Unit::TestCase

  def setup
    @working_path = File.join(fixture_path, 'stylesheets', 'valid')
    @to = File.join(@working_path, 'css')
    remove_to
    Compass.add_configuration({:sass_path => File.join(@working_path, 'sass'), :css_path => @to }, 'test')
  end

  test "it sould create a new instance of a compass compiler" do
    watch_compiler = Compass::Watcher::Compiler.new(@working_path, {})
    assert watch_compiler.compiler.is_a?(Compass::Compiler)
  end

  test "debug info gets passed into sass options" do
    watch_compiler = Compass::Watcher::Compiler.new(@working_path, {:debug_info => true})
    assert watch_compiler.compiler_options[:sass][:debug_info]
  end
  
  test "should run compiler" do
    watch_compiler = Compass::Watcher::Compiler.new(@working_path, {})
    watch_compiler.compiler.expects(:reset_staleness_checker!).once
    watch_compiler.compiler.expects(:run).once
    watch_compiler.expects(:log_action).once
    watch_compiler.compile
  end

  def remove_to
    ::FileUtils.rm_r @to if File.exists?(@to)
  end

  def teardown
    remove_to
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
compass-1.0.0.alpha.21 test/units/watcher/compiler_test.rb
compass-1.0.0.alpha.20 test/units/watcher/compiler_test.rb
compass-1.0.0.alpha.19 test/units/watcher/compiler_test.rb
compass-1.0.0.alpha.18 test/units/watcher/compiler_test.rb
compass-1.0.0.alpha.17 test/units/watcher/compiler_test.rb
compass-1.0.0.alpha.16 test/units/watcher/compiler_test.rb
compass-1.0.0.alpha.15 test/units/watcher/compiler_test.rb
compass-1.0.0.alpha.14 test/units/watcher/compiler_test.rb
compass-1.0.0.alpha.13 test/units/watcher/compiler_test.rb
compass-0.13.alpha.12 test/units/watcher/compiler_test.rb
compass-0.13.alpha.10 test/units/watcher/compiler_test.rb
compass-0.13.alpha.9 test/units/watcher/compiler_test.rb
compass-0.13.alpha.8 test/units/watcher/compiler_test.rb
compass-0.13.alpha.7 test/units/watcher/compiler_test.rb
compass-0.13.alpha.6 test/units/watcher/compiler_test.rb
compass-0.13.alpha.5 test/units/watcher/compiler_test.rb
compass-0.13.alpha.4 test/units/watcher/compiler_test.rb
compass-0.13.alpha.3 test/units/watcher/compiler_test.rb
compass-0.13.alpha.2 test/units/watcher/compiler_test.rb