File: testing.markdown

package info (click to toggle)
ruby-compass 0.12.2~dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,308 kB
  • sloc: ruby: 10,474; makefile: 42; xml: 14
file content (24 lines) | stat: -rw-r--r-- 548 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
title: Testing Your Stylesheets
layout: tutorial
crumb: Testing
classnames:
  - tutorial
---

# Test Unit

    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