UNPKG

544 BPlain TextView Raw
1require 'test_helper'
2require 'fileutils'
3require 'sass'
4
5class 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 # nothing was raised
16 end
17 end
18end