Class | Compass::TestCase
In: | lib/compass/test_case.rb
Parent: | (defined?(ActiveSupport::TestCase) ? ActiveSupport::TestCase : Test::Unit::TestCase)

Write your unit test like this if you want to make sure all your stylesheets compile.

require ‘compass/test_case’ class StylesheetsTest < Compass::TestCase

      def test_stylesheets
        my_sass_files.each do |sass_file|
          assert_compiles(sass_file) do |result|
            assert_not_blank result
          end
        end
      end
      protected
      def my_sass_files
        Dir.glob(File.expand_path(File.join(File.dirname(__FILE__), "../..", "app/stylesheets/**/[^_]*.sass")))
      end

end

### Methods

assert_compiles compile setup

### Public Instance methods

assert_compiles(stylesheet, &block)
compile(stylesheet) {|@last_compile if block_given?| ...}
setup()

[Validate]