sassc 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/ext/libsass/.gitignore +6 -0
  4. data/ext/libsass/.travis.yml +5 -1
  5. data/ext/libsass/Makefile +12 -3
  6. data/ext/libsass/Makefile.am +16 -28
  7. data/ext/libsass/Readme.md +1 -0
  8. data/ext/libsass/appveyor.yml +1 -2
  9. data/ext/libsass/ast.cpp +9 -0
  10. data/ext/libsass/ast.hpp +152 -55
  11. data/ext/libsass/ast_factory.hpp +2 -0
  12. data/ext/libsass/ast_fwd_decl.hpp +1 -0
  13. data/ext/libsass/backtrace.hpp +2 -2
  14. data/ext/libsass/bind.cpp +15 -13
  15. data/ext/libsass/configure.ac +17 -5
  16. data/ext/libsass/constants.cpp +22 -2
  17. data/ext/libsass/constants.hpp +21 -2
  18. data/ext/libsass/context.cpp +79 -57
  19. data/ext/libsass/context.hpp +23 -9
  20. data/ext/libsass/contextualize.cpp +2 -28
  21. data/ext/libsass/contextualize.hpp +6 -10
  22. data/ext/libsass/contextualize_eval.cpp +93 -0
  23. data/ext/libsass/contextualize_eval.hpp +44 -0
  24. data/ext/libsass/contrib/plugin.cpp +57 -0
  25. data/ext/libsass/cssize.cpp +3 -1
  26. data/ext/libsass/debugger.hpp +242 -83
  27. data/ext/libsass/emitter.cpp +1 -1
  28. data/ext/libsass/emitter.hpp +1 -1
  29. data/ext/libsass/environment.hpp +109 -25
  30. data/ext/libsass/error_handling.cpp +3 -3
  31. data/ext/libsass/error_handling.hpp +0 -1
  32. data/ext/libsass/eval.cpp +145 -61
  33. data/ext/libsass/eval.hpp +9 -1
  34. data/ext/libsass/expand.cpp +134 -60
  35. data/ext/libsass/expand.hpp +5 -2
  36. data/ext/libsass/extend.cpp +7 -5
  37. data/ext/libsass/file.cpp +176 -123
  38. data/ext/libsass/file.hpp +44 -7
  39. data/ext/libsass/functions.cpp +36 -17
  40. data/ext/libsass/functions.hpp +2 -2
  41. data/ext/libsass/inspect.cpp +23 -14
  42. data/ext/libsass/inspect.hpp +1 -0
  43. data/ext/libsass/json.cpp +132 -135
  44. data/ext/libsass/lexer.cpp +133 -0
  45. data/ext/libsass/lexer.hpp +239 -0
  46. data/ext/libsass/listize.cpp +83 -0
  47. data/ext/libsass/listize.hpp +41 -0
  48. data/ext/libsass/operation.hpp +2 -0
  49. data/ext/libsass/output.cpp +5 -6
  50. data/ext/libsass/parser.cpp +426 -388
  51. data/ext/libsass/parser.hpp +97 -109
  52. data/ext/libsass/plugins.cpp +15 -2
  53. data/ext/libsass/plugins.hpp +6 -4
  54. data/ext/libsass/position.cpp +52 -17
  55. data/ext/libsass/position.hpp +19 -17
  56. data/ext/libsass/prelexer.cpp +202 -235
  57. data/ext/libsass/prelexer.hpp +73 -333
  58. data/ext/libsass/sass.cpp +21 -11
  59. data/ext/libsass/sass.h +6 -6
  60. data/ext/libsass/sass_context.cpp +167 -81
  61. data/ext/libsass/sass_context.h +26 -6
  62. data/ext/libsass/sass_functions.cpp +49 -40
  63. data/ext/libsass/sass_functions.h +55 -43
  64. data/ext/libsass/sass_interface.cpp +9 -8
  65. data/ext/libsass/sass_interface.h +3 -3
  66. data/ext/libsass/sass_version.h +8 -0
  67. data/ext/libsass/sass_version.h.in +8 -0
  68. data/ext/libsass/script/ci-build-libsass +3 -3
  69. data/ext/libsass/script/ci-report-coverage +2 -1
  70. data/ext/libsass/source_map.cpp +2 -2
  71. data/ext/libsass/util.cpp +60 -11
  72. data/ext/libsass/util.hpp +6 -1
  73. data/ext/libsass/win/libsass.filters +12 -0
  74. data/ext/libsass/win/libsass.vcxproj +10 -0
  75. data/lib/sassc.rb +3 -1
  76. data/lib/sassc/cache_stores/base.rb +2 -0
  77. data/lib/sassc/dependency.rb +3 -1
  78. data/lib/sassc/engine.rb +31 -16
  79. data/lib/sassc/error.rb +3 -2
  80. data/lib/sassc/functions_handler.rb +54 -0
  81. data/lib/sassc/import_handler.rb +41 -0
  82. data/lib/sassc/importer.rb +4 -31
  83. data/lib/sassc/native.rb +1 -1
  84. data/lib/sassc/native/native_context_api.rb +3 -2
  85. data/lib/sassc/script.rb +0 -51
  86. data/lib/sassc/version.rb +1 -1
  87. data/sassc.gemspec +1 -0
  88. data/test/custom_importer_test.rb +72 -69
  89. data/test/engine_test.rb +53 -54
  90. data/test/functions_test.rb +40 -39
  91. data/test/native_test.rb +145 -149
  92. data/test/output_style_test.rb +98 -0
  93. data/test/test_helper.rb +21 -7
  94. metadata +28 -2
@@ -1,4 +1,45 @@
1
1
  module SassC
2
2
  class ImportHandler
3
+ def initialize(options)
4
+ @importer = if options[:importer]
5
+ options[:importer].new(options)
6
+ else
7
+ nil
8
+ end
9
+ end
10
+
11
+ def setup(native_options)
12
+ return unless @importer
13
+
14
+ importer_callback = Native.make_importer(import_function, nil)
15
+
16
+ list = Native.make_function_list(1)
17
+ Native::function_set_list_entry(list, 0, importer_callback)
18
+
19
+ Native.option_set_c_importers(native_options, list)
20
+ end
21
+
22
+ private
23
+
24
+ def import_function
25
+ @import_function ||= FFI::Function.new(:pointer, [:string, :string, :pointer]) do |path, parent_path, cookie|
26
+ imports = [*@importer.imports(path, parent_path)]
27
+ imports_to_native(imports)
28
+ end
29
+ end
30
+
31
+ def imports_to_native(imports)
32
+ import_list = Native.make_import_list(imports.size)
33
+
34
+ imports.each_with_index do |import, i|
35
+ source = import.source ? Native.native_string(import.source) : nil
36
+ source_map_path = nil
37
+
38
+ entry = Native.make_import_entry(import.path, source, source_map_path)
39
+ Native.import_set_list_entry(import_list, i, entry)
40
+ end
41
+
42
+ import_list
43
+ end
3
44
  end
4
45
  end
@@ -2,41 +2,14 @@ module SassC
2
2
  class Importer
3
3
  attr_reader :options
4
4
 
5
- def imports(path, parent_path)
6
- # A custom importer must override this method.
7
- raise NotImplementedError
8
- end
9
-
10
- def setup(native_options)
11
- @function = FFI::Function.new(:pointer, [:string, :string, :pointer]) do |path, parent_path, cookie|
12
- imports = [*imports(path, parent_path)]
13
- self.class.imports_to_native(imports)
14
- end
15
-
16
- callback = SassC::Native.make_importer(@function, nil)
17
- SassC::Native.option_set_importer(native_options, callback)
18
- end
19
-
20
5
  def initialize(options)
21
6
  @options = options
22
7
  end
23
8
 
24
- def self.empty_imports
25
- SassC::Native.make_import_list(0)
26
- end
27
-
28
- def self.imports_to_native(imports)
29
- import_list = SassC::Native.make_import_list(imports.size)
30
-
31
- imports.each_with_index do |import, i|
32
- source = import.source ? Native.native_string(import.source) : nil
33
- source_map_path = nil
34
-
35
- entry = SassC::Native.make_import_entry(import.path, source, source_map_path)
36
- SassC::Native.import_set_list_entry(import_list, i, entry)
37
- end
38
-
39
- import_list
9
+ def imports(path, parent_path)
10
+ # A custom importer must override this method.
11
+ # Custom importer may return an Import, or an array of Imports.
12
+ raise NotImplementedError
40
13
  end
41
14
 
42
15
  class Import
@@ -49,7 +49,7 @@ module SassC
49
49
 
50
50
  def self.native_string(string)
51
51
  string += "\0"
52
- data = SassC::Native::LibC.malloc(string.size)
52
+ data = Native::LibC.malloc(string.size)
53
53
  data.write_string(string)
54
54
  data
55
55
  end
@@ -99,7 +99,7 @@ module SassC
99
99
  # ADDAPI void ADDCALL sass_option_set_include_path (struct Sass_Options* options, const char* include_path);
100
100
  # ADDAPI void ADDCALL sass_option_set_source_map_file (struct Sass_Options* options, const char* source_map_file);
101
101
  # ADDAPI void ADDCALL sass_option_set_c_functions (struct Sass_Options* options, Sass_C_Function_List c_functions);
102
- # ADDAPI void ADDCALL sass_option_set_importer (struct Sass_Options* options, Sass_C_Import_Callback importer);
102
+ # ADDAPI void ADDCALL sass_option_set_c_importers (struct Sass_Options* options, Sass_Importer_List c_importers);
103
103
  attach_function :sass_option_set_precision, [:sass_options_ptr, :int], :void
104
104
  attach_function :sass_option_set_output_style, [:sass_options_ptr, SassOutputStyle], :void
105
105
  attach_function :sass_option_set_source_comments, [:sass_options_ptr, :bool], :void
@@ -112,7 +112,8 @@ module SassC
112
112
  attach_function :sass_option_set_include_path, [:sass_options_ptr, :string], :void
113
113
  attach_function :sass_option_set_source_map_file, [:sass_options_ptr, :string], :void
114
114
  attach_function :sass_option_set_c_functions, [:sass_options_ptr, :pointer], :void
115
- attach_function :sass_option_set_importer, [:sass_options_ptr, :sass_importer], :void
115
+ attach_function :sass_option_set_c_importers, [:sass_options_ptr, :pointer], :void
116
+ #attach_function :sass_option_set_c_importers, [:sass_options_ptr, :sass_importer], :void
116
117
 
117
118
  # Getter for context
118
119
  # ADDAPI const char* ADDCALL sass_context_get_output_string (struct Sass_Context* ctx);
@@ -6,57 +6,6 @@ module SassC
6
6
  end
7
7
  end
8
8
 
9
- def self.setup_custom_functions(options, sass_options)
10
- callbacks = {}
11
-
12
- list = Native.make_function_list(custom_functions.count)
13
-
14
- functs = Class.new.extend(Functions)
15
- def functs.options=(opts)
16
- @sass_options = opts
17
- end
18
- def functs.options
19
- @sass_options
20
- end
21
- functs.options = sass_options
22
-
23
- custom_functions.each_with_index do |custom_function, i|
24
- callbacks[custom_function] = FFI::Function.new(:pointer, [:pointer, :pointer]) do |s_args, cookie|
25
- length = Native.list_get_length(s_args)
26
-
27
- v = Native.list_get_value(s_args, 0)
28
- v = Native.string_get_value(v).dup
29
-
30
- s = String.new(String.unquote(v), String.type(v))
31
-
32
- value = functs.send(custom_function, s)
33
-
34
- if value
35
- value = String.new(String.unquote(value.to_s), value.type)
36
- value.to_native
37
- else
38
- String.new("").to_native
39
- end
40
- end
41
-
42
- callback = Native.make_function(
43
- formatted_function_name(custom_function),
44
- callbacks[custom_function],
45
- nil
46
- )
47
-
48
- Native::function_set_list_entry(list, i, callback)
49
- end
50
-
51
- Native::option_set_c_functions(options, list)
52
-
53
- status = yield
54
-
55
- callbacks
56
-
57
- status
58
- end
59
-
60
9
  def self.formatted_function_name(function_name)
61
10
  params = Functions.instance_method(function_name).parameters
62
11
  params = params.select { |param| param[0] == :req }
@@ -1,3 +1,3 @@
1
1
  module SassC
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "minitest", "~> 5.5.1"
25
25
  spec.add_development_dependency "minitest-around"
26
26
  spec.add_development_dependency "test_construct"
27
+ spec.add_development_dependency "pry"
27
28
 
28
29
  spec.add_dependency "bundler"
29
30
  spec.add_dependency "ffi", "~> 1.9.6"
@@ -1,109 +1,112 @@
1
1
  require_relative "test_helper"
2
2
 
3
- class FunctionsTest < SassCTest
4
- class CustomImporter < SassC::Importer
5
- def imports(path, parent_path)
6
- if path =~ /styles/
7
- [
8
- Import.new("#{path}1.scss", source: "$var1: #000;"),
9
- Import.new("#{path}2.scss")
10
- ]
11
- else
12
- Import.new(path)
3
+ module SassC
4
+ class CustomImporterTest < MiniTest::Test
5
+ include TempFileTest
6
+
7
+ class CustomImporter < Importer
8
+ def imports(path, parent_path)
9
+ if path =~ /styles/
10
+ [
11
+ Import.new("#{path}1.scss", source: "$var1: #000;"),
12
+ Import.new("#{path}2.scss")
13
+ ]
14
+ else
15
+ Import.new(path)
16
+ end
13
17
  end
14
18
  end
15
- end
16
19
 
17
- class NoFilesImporter < SassC::Importer
18
- def imports(path, parent_path)
19
- []
20
- end
21
- end
22
-
23
- class OptionsImporter < SassC::Importer
24
- def imports(path, parent_path)
25
- Import.new("name.scss", source: options[:custom_option_source])
20
+ class NoFilesImporter < Importer
21
+ def imports(path, parent_path)
22
+ []
23
+ end
26
24
  end
27
- end
28
25
 
29
- def around
30
- within_construct do |construct|
31
- @construct = construct
32
- yield
26
+ class OptionsImporter < Importer
27
+ def imports(path, parent_path)
28
+ Import.new("name.scss", source: options[:custom_option_source])
29
+ end
33
30
  end
34
31
 
35
- @construct = nil
36
- end
32
+ def test_custom_importer_works
33
+ temp_file("styles2.scss", ".hi { color: $var1; }")
34
+ temp_file("fonts.scss", ".font { color: $var1; }")
37
35
 
38
- def test_custom_importer_works
39
- @construct.file("styles2.scss", ".hi { color: $var1; }")
40
- @construct.file("fonts.scss", ".font { color: $var1; }")
41
-
42
- data = <<SCSS
36
+ data = <<SCSS
43
37
  @import "styles";
44
38
  @import "fonts";
45
39
  SCSS
46
40
 
47
- engine = SassC::Engine.new(data, {
48
- importer: CustomImporter
49
- })
41
+ engine = Engine.new(data, {
42
+ importer: CustomImporter
43
+ })
50
44
 
51
- assert_equal <<CSS, engine.render
45
+ assert_equal <<CSS, engine.render
52
46
  .hi {
53
47
  color: #000; }
54
48
 
55
49
  .font {
56
50
  color: #000; }
57
51
  CSS
58
- end
52
+ end
59
53
 
60
- def test_dependency_list
61
- @construct.file("styles2.scss", ".hi { color: $var1; }")
62
- @construct.file("fonts.scss", ".font { color: $var1; }")
54
+ def test_dependency_list
55
+ temp_dir("fonts")
56
+ temp_dir("fonts/sub")
57
+ temp_file("fonts/sub/sub_fonts.scss", "$font: arial;")
58
+ temp_file("styles2.scss", ".hi { color: $var1; }")
59
+ temp_file "fonts/fonts.scss", <<SCSS
60
+ @import "sub/sub_fonts";
61
+ .font { font-familiy: $font; color: $var1; }
62
+ SCSS
63
63
 
64
- data = <<SCSS
64
+ data = <<SCSS
65
65
  @import "styles";
66
66
  @import "fonts";
67
67
  SCSS
68
68
 
69
- engine = SassC::Engine.new(data, {
70
- importer: CustomImporter
71
- })
72
- engine.render
69
+ engine = Engine.new(data, {
70
+ importer: CustomImporter,
71
+ load_paths: ["fonts"]
72
+ })
73
+ engine.render
73
74
 
74
- dependencies = engine.dependencies.map(&:options).map { |o| o[:filename] }
75
+ dependencies = engine.dependencies.map(&:filename)
75
76
 
76
- # TODO: this behavior is kind of weird (styles1.scss is not included)
77
- # not sure why.
77
+ # TODO: this behavior is kind of weird (styles1.scss is not included)
78
+ # not sure why.
78
79
 
79
- assert_equal [
80
- "fonts.scss",
81
- "styles",
82
- "styles2.scss"
83
- ], dependencies
84
- end
80
+ assert_equal [
81
+ "fonts/fonts.scss",
82
+ "fonts/sub/sub_fonts.scss",
83
+ "styles",
84
+ "styles2.scss"
85
+ ], dependencies
86
+ end
85
87
 
86
- def test_custom_importer_works_with_no_files
87
- engine = SassC::Engine.new("@import 'fake.scss';", {
88
- importer: NoFilesImporter
89
- })
88
+ def test_custom_importer_works_with_no_files
89
+ engine = Engine.new("@import 'fake.scss';", {
90
+ importer: NoFilesImporter
91
+ })
90
92
 
91
- assert_equal "", engine.render
92
- end
93
+ assert_equal "", engine.render
94
+ end
93
95
 
94
- def test_custom_importer_can_access_sassc_options
95
- engine = SassC::Engine.new("@import 'fake.scss';", {
96
- importer: OptionsImporter,
97
- custom_option_source: ".test { width: 30px; }"
98
- })
96
+ def test_custom_importer_can_access_sassc_options
97
+ engine = Engine.new("@import 'fake.scss';", {
98
+ importer: OptionsImporter,
99
+ custom_option_source: ".test { width: 30px; }"
100
+ })
99
101
 
100
- assert_equal <<CSS, engine.render
102
+ assert_equal <<CSS, engine.render
101
103
  .test {
102
104
  width: 30px; }
103
105
  CSS
104
- end
106
+ end
105
107
 
106
- def test_parent_path_is_accessible
107
- skip "TBD"
108
+ def test_parent_path_is_accessible
109
+ skip "TBD"
110
+ end
108
111
  end
109
112
  end
@@ -1,12 +1,15 @@
1
1
  require_relative "test_helper"
2
2
 
3
- class EngineTest < SassCTest
4
- def render(data)
5
- SassC::Engine.new(data).render
6
- end
3
+ module SassC
4
+ class EngineTest < MiniTest::Test
5
+ include TempFileTest
6
+
7
+ def render(data)
8
+ Engine.new(data).render
9
+ end
7
10
 
8
- def test_one_line_comments
9
- assert_equal <<CSS, render(<<SCSS)
11
+ def test_one_line_comments
12
+ assert_equal <<CSS, render(<<SCSS)
10
13
  .foo {
11
14
  baz: bang; }
12
15
  CSS
@@ -14,7 +17,7 @@ CSS
14
17
  baz: bang; //}
15
18
  }
16
19
  SCSS
17
- assert_equal <<CSS, render(<<SCSS)
20
+ assert_equal <<CSS, render(<<SCSS)
18
21
  .foo bar[val="//"] {
19
22
  baz: bang; }
20
23
  CSS
@@ -24,8 +27,8 @@ CSS
24
27
  SCSS
25
28
  end
26
29
 
27
- def test_variables
28
- assert_equal <<CSS, render(<<SCSS)
30
+ def test_variables
31
+ assert_equal <<CSS, render(<<SCSS)
29
32
  blat {
30
33
  a: foo; }
31
34
  CSS
@@ -34,7 +37,7 @@ $var: foo;
34
37
  blat {a: $var}
35
38
  SCSS
36
39
 
37
- assert_equal <<CSS, render(<<SCSS)
40
+ assert_equal <<CSS, render(<<SCSS)
38
41
  foo {
39
42
  a: 2;
40
43
  b: 6; }
@@ -45,66 +48,61 @@ foo {
45
48
  a: $var;
46
49
  b: $var + $another-var;}
47
50
  SCSS
48
- end
51
+ end
49
52
 
50
- def test_dependency_filenames_are_reported
51
- within_construct do |construct|
52
- construct.file("not_included.scss", "$size: 30px;")
53
- construct.file("import_parent.scss", "$size: 30px;")
54
- construct.file("import.scss", "@import 'import_parent'; $size: 30px;")
55
- construct.file("styles.scss", "@import 'import.scss'; .hi { width: $size; }")
53
+ def test_dependency_filenames_are_reported
54
+ temp_file("not_included.scss", "$size: 30px;")
55
+ temp_file("import_parent.scss", "$size: 30px;")
56
+ temp_file("import.scss", "@import 'import_parent'; $size: 30px;")
57
+ temp_file("styles.scss", "@import 'import.scss'; .hi { width: $size; }")
56
58
 
57
- engine = SassC::Engine.new(File.read("styles.scss"))
59
+ engine = Engine.new(File.read("styles.scss"))
58
60
  engine.render
59
61
  deps = engine.dependencies
60
- filenames = deps.map { |dep| dep.options[:filename] }.sort
61
62
 
62
- assert_equal ["import.scss", "import_parent.scss"], filenames
63
+ expected = ["import.scss", "import_parent.scss"]
64
+ assert_equal expected, deps.map { |dep| dep.options[:filename] }.sort
65
+ assert_equal expected, deps.map(&:filename).sort
63
66
  end
64
- end
65
67
 
66
- def test_no_dependencies
67
- engine = SassC::Engine.new("$size: 30px;")
68
- engine.render
69
- deps = engine.dependencies
70
- assert_equal [], deps
71
- end
68
+ def test_no_dependencies
69
+ engine = Engine.new("$size: 30px;")
70
+ engine.render
71
+ deps = engine.dependencies
72
+ assert_equal [], deps
73
+ end
72
74
 
73
- def test_not_rendered_error
74
- engine = SassC::Engine.new("$size: 30px;")
75
- assert_raises(SassC::Engine::NotRenderedError) { engine.dependencies }
76
- end
75
+ def test_not_rendered_error
76
+ engine = Engine.new("$size: 30px;")
77
+ assert_raises(NotRenderedError) { engine.dependencies }
78
+ end
77
79
 
78
- def test_load_paths
79
- within_construct do |c|
80
- c.directory("included_1")
81
- c.directory("included_2")
80
+ def test_load_paths
81
+ temp_dir("included_1")
82
+ temp_dir("included_2")
82
83
 
83
- c.file("included_1/import_parent.scss", "$s: 30px;")
84
- c.file("included_2/import.scss", "@import 'import_parent'; $size: $s;")
85
- c.file("styles.scss", "@import 'import.scss'; .hi { width: $size; }")
84
+ temp_file("included_1/import_parent.scss", "$s: 30px;")
85
+ temp_file("included_2/import.scss", "@import 'import_parent'; $size: $s;")
86
+ temp_file("styles.scss", "@import 'import.scss'; .hi { width: $size; }")
86
87
 
87
- assert_equal ".hi {\n width: 30px; }\n", SassC::Engine.new(
88
+ assert_equal ".hi {\n width: 30px; }\n", Engine.new(
88
89
  File.read("styles.scss"),
89
90
  load_paths: [ "included_1", "included_2" ]
90
91
  ).render
91
92
  end
92
- end
93
93
 
94
- def test_load_paths_not_configured
95
- within_construct do |c|
96
- c.file("included_1/import_parent.scss", "$s: 30px;")
97
- c.file("included_2/import.scss", "@import 'import_parent'; $size: $s;")
98
- c.file("styles.scss", "@import 'import.scss'; .hi { width: $size; }")
94
+ def test_load_paths_not_configured
95
+ temp_file("included_1/import_parent.scss", "$s: 30px;")
96
+ temp_file("included_2/import.scss", "@import 'import_parent'; $size: $s;")
97
+ temp_file("styles.scss", "@import 'import.scss'; .hi { width: $size; }")
99
98
 
100
- assert_raises(SassC::SyntaxError) {
101
- SassC::Engine.new(File.read("styles.scss")).render
102
- }
99
+ assert_raises(SyntaxError) do
100
+ Engine.new(File.read("styles.scss")).render
101
+ end
103
102
  end
104
- end
105
103
 
106
- def test_sass_variation
107
- sass = <<SASS
104
+ def test_sass_variation
105
+ sass = <<SASS
108
106
  $size: 30px
109
107
  .foo
110
108
  width: $size
@@ -115,8 +113,9 @@ SASS
115
113
  width: 30px; }
116
114
  CSS
117
115
 
118
- assert_equal css, SassC::Engine.new(sass, syntax: :sass).render
119
- assert_equal css, SassC::Engine.new(sass, syntax: "sass").render
120
- assert_raises(SassC::SyntaxError) { SassC::Engine.new(sass).render }
116
+ assert_equal css, Engine.new(sass, syntax: :sass).render
117
+ assert_equal css, Engine.new(sass, syntax: "sass").render
118
+ assert_raises(SyntaxError) { Engine.new(sass).render }
119
+ end
121
120
  end
122
121
  end