Version 1
[yaffs-website] / vendor / twbs / bootstrap-sass / test / sass_test.rb
diff --git a/vendor/twbs/bootstrap-sass/test/sass_test.rb b/vendor/twbs/bootstrap-sass/test/sass_test.rb
new file mode 100644 (file)
index 0000000..fc54c77
--- /dev/null
@@ -0,0 +1,26 @@
+require 'test_helper'
+require 'shellwords'
+
+class SassTest < Minitest::Test
+  DUMMY_PATH = 'test/dummy_sass_only'
+
+  def test_font_helper
+    assert_match %r(url\(['"]?.*eot['"]?\)), @css
+  end
+
+  def setup
+    Dir.chdir DUMMY_PATH do
+      %x[rm -rf .sass-cache/]
+      %x[bundle]
+    end
+    css_path = File.join GEM_PATH, 'tmp/bootstrap-sass-only.css'
+    command  = "bundle exec ruby compile.rb #{Shellwords.escape css_path}"
+    success  = Dir.chdir DUMMY_PATH do
+      silence_stdout_if !ENV['VERBOSE'] do
+        system(command)
+      end
+    end
+    assert success, 'Sass-only compilation failed'
+    @css = File.read(css_path)
+  end
+end