diff --git a/test/custom_importer_test.rb b/test/custom_importer_test.rb index 88577e7..dfb556c 100644 --- a/test/custom_importer_test.rb +++ b/test/custom_importer_test.rb @@ -67,6 +67,26 @@ def test_custom_importer_works CSS end + def test_custom_importer_works_for_file_in_parent_dir + temp_dir('sub') + temp_file('a.scss', 'a {b: c}') + temp_file('sub/b.scss', '@import "../a"') + + data = <<~SCSS + @import "sub/b.scss"; + SCSS + + engine = Engine.new(data, { + importer: CustomImporter + }) + + assert_equal <<~CSS, engine.render + a { + b: c; + } + CSS + end + def test_dependency_list base = Dir.pwd