1 | require 'test_helper'
|
2 | require 'fileutils'
|
3 | require 'sass'
|
4 |
|
5 | class CompilationTest < Minitest::Test
|
6 | def test_compilation
|
7 | path = 'assets/stylesheets'
|
8 | %w(_bootstrap bootstrap/_theme).each do |file|
|
9 | FileUtils.rm_rf('.sass-cache', secure: true)
|
10 | engine = Sass::Engine.for_file("#{path}/#{file}.scss", syntax: :scss, load_paths: [path])
|
11 | FileUtils.mkdir_p("tmp/#{File.dirname(file)}")
|
12 | File.open("tmp/#{file}.css", 'w') { |f|
|
13 | f.write engine.render
|
14 | }
|
15 | assert true
|
16 | end
|
17 | end
|
18 | end
|