From 0b169fec229bd4bc0db2ef256e777c801633f2e5 Mon Sep 17 00:00:00 2001 From: Scott Davis Date: Sun, 9 Oct 2011 09:36:35 -0400 Subject: [PATCH] closes #237 --- .../content/help/tutorials/testing.markdown | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 doc-src/content/help/tutorials/testing.markdown diff --git a/doc-src/content/help/tutorials/testing.markdown b/doc-src/content/help/tutorials/testing.markdown new file mode 100644 index 00000000..0761261f --- /dev/null +++ b/doc-src/content/help/tutorials/testing.markdown @@ -0,0 +1,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 \ No newline at end of file