2012-05-06 19:50:46 +01:00
|
|
|
require 'test_helper'
|
2013-10-31 17:46:07 +01:00
|
|
|
require 'fileutils'
|
2014-09-02 23:48:44 +02:00
|
|
|
require 'sass'
|
2012-05-06 19:50:46 +01:00
|
|
|
|
2014-09-02 23:48:44 +02:00
|
|
|
class CompilationTest < Minitest::Test
|
2012-05-06 19:50:46 +01:00
|
|
|
def test_compilation
|
2014-06-24 02:57:06 +02:00
|
|
|
path = 'assets/stylesheets'
|
2014-09-02 23:48:44 +02:00
|
|
|
%w(_bootstrap bootstrap/_theme).each do |file|
|
|
|
|
FileUtils.rm_rf('.sass-cache', secure: true)
|
2012-11-01 08:48:46 -04:00
|
|
|
engine = Sass::Engine.for_file("#{path}/#{file}.scss", syntax: :scss, load_paths: [path])
|
2014-09-02 23:48:44 +02:00
|
|
|
FileUtils.mkdir_p("tmp/#{File.dirname(file)}")
|
|
|
|
File.open("tmp/#{file}.css", 'w') { |f|
|
|
|
|
f.write engine.render
|
|
|
|
}
|
|
|
|
assert true # nothing was raised
|
2012-05-06 19:50:46 +01:00
|
|
|
end
|
|
|
|
end
|
2013-12-08 22:24:56 +01:00
|
|
|
end
|