1 | require 'test_helper'
|
2 | require 'shellwords'
|
3 |
|
4 | class SassTest < Minitest::Test
|
5 | DUMMY_PATH = 'test/dummy_sass_only'
|
6 |
|
7 | def test_font_helper
|
8 | assert_match %r(url\(['"]?.*eot['"]?\)), @css
|
9 | end
|
10 |
|
11 | def setup
|
12 | Dir.chdir DUMMY_PATH do
|
13 | %x[rm -rf .sass-cache/]
|
14 | %x[bundle]
|
15 | end
|
16 | css_path = File.join GEM_PATH, 'tmp/bootstrap-sass-only.css'
|
17 | command = "bundle exec ruby compile.rb
|
18 | success = Dir.chdir DUMMY_PATH do
|
19 | silence_stdout_if !ENV['VERBOSE'] do
|
20 | system(command)
|
21 | end
|
22 | end
|
23 | assert success, 'Sass-only compilation failed'
|
24 | @css = File.read(css_path)
|
25 | end
|
26 | end
|