Sha256: e9cca3938bbbcfddae8ae153adbefef232fdcc7811f56d3d562ad505be6af581
Contents?: true
Size: 821 Bytes
Versions: 2
Compression:
Stored size: 821 Bytes
Contents
require 'test/unit' require 'sass' require 'compass-import_once' class SassImportOnceTest < Test::Unit::TestCase def test_will_import_file_once css = render_file("test.scss") assert_equal 1, css.scan(/#i\.was\.imported/).count end private def render_file(filename) fixtures_dir = File.expand_path("fixtures", File.dirname(__FILE__)) full_filename = File.expand_path(filename, fixtures_dir) syntax = File.extname(full_filename)[1..-1].to_sym engine = Sass::Engine.new(File.read(full_filename), :syntax => syntax, :filename => full_filename, :cache => false, :read_cache => false, :load_paths => [fixtures_dir]) engine.render end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
compass-import_once-0.1.3 | test/compass_import_once_test.rb |
compass-import_once-0.1.2 | test/compass_import_once_test.rb |