sass-embedded 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +0 -3
- data/Gemfile +2 -0
- data/Rakefile +3 -1
- data/ext/sass_embedded/extconf.rb +55 -62
- data/lib/sass.rb +13 -8
- data/lib/sass/embedded/compiler.rb +95 -107
- data/lib/sass/embedded/transport.rb +55 -62
- data/lib/sass/error.rb +5 -2
- data/lib/sass/platform.rb +17 -20
- data/lib/sass/util.rb +4 -4
- data/lib/sass/version.rb +1 -2
- data/sass-embedded.gemspec +18 -19
- data/test/compiler_test.rb +151 -153
- data/test/custom_importer_test.rb +95 -93
- data/test/error_test.rb +13 -15
- data/test/functions_test.rb +193 -177
- data/test/output_style_test.rb +44 -44
- data/test/sass_test.rb +22 -0
- data/test/test_helper.rb +5 -5
- metadata +17 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative
|
3
|
+
require_relative 'test_helper'
|
4
4
|
|
5
5
|
module Sass
|
6
6
|
class CustomImporterTest < MiniTest::Test
|
@@ -11,6 +11,7 @@ module Sass
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def teardown
|
14
|
+
@compiler.close
|
14
15
|
end
|
15
16
|
|
16
17
|
def render(data, importer)
|
@@ -18,143 +19,144 @@ module Sass
|
|
18
19
|
end
|
19
20
|
|
20
21
|
def test_custom_importer_works
|
21
|
-
temp_file(
|
22
|
+
temp_file('fonts.scss', '.font { color: $var1; }')
|
22
23
|
|
23
|
-
data =
|
24
|
-
@import "styles";
|
25
|
-
@import "fonts";
|
26
|
-
SCSS
|
24
|
+
data = <<~SCSS
|
25
|
+
@import "styles";
|
26
|
+
@import "fonts";
|
27
|
+
SCSS
|
27
28
|
|
28
29
|
output = render(data, [
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
lambda { |url, _prev|
|
31
|
+
{ contents: '$var1: #000; .hi { color: $var1; }' } if url =~ /styles/
|
32
|
+
}
|
33
|
+
])
|
34
|
+
|
35
|
+
assert_equal <<~CSS.chomp, output
|
36
|
+
.hi {
|
37
|
+
color: #000;
|
33
38
|
}
|
34
|
-
])
|
35
39
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
.font {
|
42
|
-
color: #000;
|
43
|
-
}
|
44
|
-
CSS
|
40
|
+
.font {
|
41
|
+
color: #000;
|
42
|
+
}
|
43
|
+
CSS
|
45
44
|
end
|
46
45
|
|
47
46
|
def test_custom_importer_works_with_empty_contents
|
48
47
|
output = render("@import 'fake.scss';", [
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
48
|
+
lambda { |_url, _prev|
|
49
|
+
{ contents: '' }
|
50
|
+
}
|
51
|
+
])
|
53
52
|
|
54
|
-
assert_equal
|
53
|
+
assert_equal '', output
|
55
54
|
end
|
56
55
|
|
57
56
|
def test_custom_importer_works_with_file
|
58
|
-
temp_file(
|
57
|
+
temp_file('test.scss', '.test { color: #000; }')
|
59
58
|
|
60
59
|
output = render("@import 'fake.scss';", [
|
61
|
-
|
62
|
-
|
60
|
+
lambda { |_url, _prev|
|
61
|
+
{ file: File.absolute_path('test.scss') }
|
62
|
+
}
|
63
|
+
])
|
64
|
+
|
65
|
+
assert_equal <<~CSS.chomp, output
|
66
|
+
.test {
|
67
|
+
color: #000;
|
63
68
|
}
|
64
|
-
|
65
|
-
|
66
|
-
assert_equal <<CSS.chomp, output
|
67
|
-
.test {
|
68
|
-
color: #000;
|
69
|
-
}
|
70
|
-
CSS
|
69
|
+
CSS
|
71
70
|
end
|
72
71
|
|
73
72
|
def test_custom_importer_comes_after_local_file
|
74
|
-
temp_file(
|
73
|
+
temp_file('test.scss', '.test { color: #000; }')
|
75
74
|
|
76
75
|
output = render("@import 'test.scss';", [
|
77
|
-
|
78
|
-
|
76
|
+
lambda { |_url, _prev|
|
77
|
+
return { contents: '.h1 { color: #fff; }' }
|
78
|
+
}
|
79
|
+
])
|
80
|
+
|
81
|
+
assert_equal <<~CSS.chomp, output
|
82
|
+
.test {
|
83
|
+
color: #000;
|
79
84
|
}
|
80
|
-
|
81
|
-
|
82
|
-
assert_equal <<CSS.chomp, output
|
83
|
-
.test {
|
84
|
-
color: #000;
|
85
|
-
}
|
86
|
-
CSS
|
85
|
+
CSS
|
87
86
|
end
|
88
87
|
|
89
88
|
def test_custom_importer_that_does_not_resolve
|
90
89
|
assert_raises(CompilationError) do
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
90
|
+
render("@import 'test.scss';", [
|
91
|
+
lambda { |_url, _prev|
|
92
|
+
return nil
|
93
|
+
}
|
94
|
+
])
|
96
95
|
end
|
97
96
|
end
|
98
97
|
|
99
98
|
def test_custom_importer_that_returns_error
|
100
99
|
assert_raises(CompilationError) do
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
100
|
+
render("@import 'test.scss';", [
|
101
|
+
lambda { |_url, _prev|
|
102
|
+
IOError.new 'test error'
|
103
|
+
}
|
104
|
+
])
|
106
105
|
end
|
107
106
|
end
|
108
107
|
|
109
108
|
def test_custom_importer_that_raises_error
|
110
109
|
assert_raises(CompilationError) do
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
110
|
+
render("@import 'test.scss';", [
|
111
|
+
lambda { |_url, _prev|
|
112
|
+
raise IOError, 'test error'
|
113
|
+
}
|
114
|
+
])
|
116
115
|
end
|
117
116
|
end
|
118
117
|
|
119
118
|
def test_parent_path_is_accessible
|
120
119
|
output = @compiler.render({
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
.
|
131
|
-
|
132
|
-
|
133
|
-
|
120
|
+
data: "@import 'parent.scss';",
|
121
|
+
file: 'import-parent-filename.scss',
|
122
|
+
importer: [
|
123
|
+
lambda { |_url, prev|
|
124
|
+
{ contents: ".#{prev} { color: red; }" }
|
125
|
+
}
|
126
|
+
]
|
127
|
+
})[:css]
|
128
|
+
|
129
|
+
assert_equal <<~CSS.chomp, output
|
130
|
+
.import-parent-filename.scss {
|
131
|
+
color: red;
|
132
|
+
}
|
133
|
+
CSS
|
134
134
|
end
|
135
135
|
|
136
136
|
def test_call_compiler_importer
|
137
137
|
output = @compiler.render({
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
138
|
+
data: "@import 'parent.scss';",
|
139
|
+
importer: [
|
140
|
+
lambda { |_url, _prev|
|
141
|
+
{
|
142
|
+
contents: @compiler.render({
|
143
|
+
data: "@import 'parent-parent.scss'",
|
144
|
+
importer: [
|
145
|
+
lambda { |_url, _prev|
|
146
|
+
{ contents: 'h1 { color: black; }' }
|
147
|
+
}
|
148
|
+
]
|
149
|
+
})[:css]
|
150
|
+
}
|
151
|
+
}
|
152
|
+
]
|
153
|
+
})[:css]
|
154
|
+
|
155
|
+
assert_equal <<~CSS.chomp, output
|
156
|
+
h1 {
|
157
|
+
color: black;
|
158
|
+
}
|
159
|
+
CSS
|
158
160
|
end
|
159
161
|
end
|
160
162
|
end
|
data/test/error_test.rb
CHANGED
@@ -1,33 +1,31 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative
|
3
|
+
require_relative 'test_helper'
|
4
4
|
|
5
5
|
module Sass
|
6
6
|
class ErrorTest < MiniTest::Test
|
7
|
-
|
8
7
|
def setup
|
9
8
|
@compiler = Embedded::Compiler.new
|
10
9
|
end
|
11
10
|
|
12
11
|
def teardown
|
12
|
+
@compiler.close
|
13
13
|
end
|
14
14
|
|
15
15
|
def test_first_backtrace_is_sass
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
}
|
16
|
+
template = <<~SCSS
|
17
|
+
.foo {
|
18
|
+
baz: bang;
|
19
|
+
padding top: 10px;
|
20
|
+
}
|
22
21
|
SCSS
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
end
|
23
|
+
@compiler.render({
|
24
|
+
data: template
|
25
|
+
})
|
26
|
+
rescue Sass::CompilationError => e
|
27
|
+
expected = 'stdin:3:20'
|
28
|
+
assert_equal expected, e.backtrace.first
|
31
29
|
end
|
32
30
|
end
|
33
31
|
end
|
data/test/functions_test.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative
|
4
|
-
require "stringio"
|
3
|
+
require_relative 'test_helper'
|
5
4
|
|
6
5
|
module Sass
|
7
6
|
class FunctionsTest < MiniTest::Test
|
@@ -10,142 +9,160 @@ module Sass
|
|
10
9
|
end
|
11
10
|
|
12
11
|
def teardown
|
12
|
+
@compiler.close
|
13
13
|
end
|
14
14
|
|
15
15
|
def render(sass)
|
16
16
|
@compiler.render({
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
17
|
+
data: sass,
|
18
|
+
functions: {
|
19
|
+
'javascript_path($path)': lambda { |path|
|
20
|
+
path.string.text = "/js/#{path.string.text}"
|
21
|
+
path
|
22
|
+
},
|
23
|
+
'stylesheet_path($path)': lambda { |path|
|
24
|
+
path.string.text = "/css/#{path.string.text}"
|
25
|
+
path
|
26
|
+
},
|
27
|
+
'sass_return_path($path)': lambda { |path|
|
28
|
+
path
|
29
|
+
},
|
30
|
+
'no_return_path($path)': lambda { |_path|
|
31
|
+
Sass::EmbeddedProtocol::Value.new(
|
32
|
+
singleton: Sass::EmbeddedProtocol::SingletonValue::NULL
|
33
|
+
)
|
34
|
+
},
|
35
|
+
'optional_arguments($path, $optional: null)': lambda { |path, optional|
|
36
|
+
Sass::EmbeddedProtocol::Value.new(
|
37
|
+
string: Sass::EmbeddedProtocol::Value::String.new(
|
38
|
+
text: "#{path.string.text}/#{optional.singleton == :NULL ? 'bar' : optional.string.text}",
|
39
|
+
quoted: true
|
40
|
+
)
|
41
|
+
)
|
42
|
+
},
|
43
|
+
'function_that_raises_errors()': lambda {
|
44
|
+
raise StandardError,
|
45
|
+
'Intentional wrong thing happened somewhere inside the custom function'
|
46
|
+
},
|
47
|
+
'nice_color_argument($color)': lambda { |color|
|
48
|
+
color
|
49
|
+
},
|
50
|
+
'returns_a_color()': lambda {
|
51
|
+
Sass::EmbeddedProtocol::Value.new(
|
52
|
+
rgb_color: Sass::EmbeddedProtocol::Value::RgbColor.new(
|
53
|
+
red: 0,
|
54
|
+
green: 0,
|
55
|
+
blue: 0,
|
56
|
+
alpha: 1
|
57
|
+
)
|
58
|
+
)
|
59
|
+
},
|
60
|
+
'returns_a_number()': lambda {
|
61
|
+
Sass::EmbeddedProtocol::Value.new(
|
62
|
+
number: Sass::EmbeddedProtocol::Value::Number.new(
|
63
|
+
value: -312,
|
64
|
+
numerators: ['rem']
|
65
|
+
)
|
66
|
+
)
|
67
|
+
},
|
68
|
+
'returns_a_bool()': lambda {
|
69
|
+
Sass::EmbeddedProtocol::Value.new(
|
70
|
+
singleton: Sass::EmbeddedProtocol::SingletonValue::TRUE
|
71
|
+
)
|
72
|
+
},
|
73
|
+
'inspect_bool($argument)': lambda { |argument|
|
74
|
+
unless argument&.singleton == :TRUE || argument.singleton == :FALSE
|
75
|
+
raise StandardError,
|
76
|
+
'passed value is not a Sass::EmbeddedProtocol::SingletonValue::TRUE or Sass::EmbeddedProtocol::SingletonValue::FALSE'
|
77
|
+
end
|
78
|
+
|
79
|
+
argument
|
80
|
+
},
|
81
|
+
'inspect_number($argument)': lambda { |argument|
|
82
|
+
unless argument&.number.is_a? Sass::EmbeddedProtocol::Value::Number
|
83
|
+
raise StandardError,
|
84
|
+
'passed value is not a Sass::EmbeddedProtocol::Value::Number'
|
85
|
+
end
|
86
|
+
|
87
|
+
argument
|
88
|
+
},
|
89
|
+
'inspect_map($argument)': lambda { |argument|
|
90
|
+
unless argument&.map.is_a? Sass::EmbeddedProtocol::Value::Map
|
91
|
+
raise StandardError,
|
92
|
+
'passed value is not a Sass::EmbeddedProtocol::Value::Map'
|
93
|
+
end
|
94
|
+
|
95
|
+
argument
|
96
|
+
},
|
97
|
+
'inspect_list($argument)': lambda { |argument|
|
98
|
+
unless argument&.list.is_a? Sass::EmbeddedProtocol::Value::List
|
99
|
+
raise StandardError,
|
100
|
+
'passed value is not a Sass::EmbeddedProtocol::Value::List'
|
101
|
+
end
|
102
|
+
|
103
|
+
argument
|
104
|
+
},
|
105
|
+
'returns_sass_value()': lambda {
|
106
|
+
Sass::EmbeddedProtocol::Value.new(
|
107
|
+
rgb_color: Sass::EmbeddedProtocol::Value::RgbColor.new(
|
108
|
+
red: 0,
|
109
|
+
green: 0,
|
110
|
+
blue: 0,
|
111
|
+
alpha: 1
|
112
|
+
)
|
113
|
+
)
|
114
|
+
},
|
115
|
+
'returns_sass_map()': lambda {
|
116
|
+
Sass::EmbeddedProtocol::Value.new(
|
117
|
+
map: Sass::EmbeddedProtocol::Value::Map.new(
|
118
|
+
entries: [
|
119
|
+
Sass::EmbeddedProtocol::Value::Map::Entry.new(
|
120
|
+
key: Sass::EmbeddedProtocol::Value.new(
|
121
|
+
string: Sass::EmbeddedProtocol::Value::String.new(
|
122
|
+
text: 'color',
|
123
|
+
quoted: true
|
124
|
+
)
|
125
|
+
),
|
126
|
+
value: Sass::EmbeddedProtocol::Value.new(
|
127
|
+
rgb_color: Sass::EmbeddedProtocol::Value::RgbColor.new(
|
128
|
+
red: 0,
|
129
|
+
green: 0,
|
130
|
+
blue: 0,
|
131
|
+
alpha: 1
|
132
|
+
)
|
133
|
+
)
|
134
|
+
)
|
135
|
+
]
|
136
|
+
)
|
137
|
+
)
|
138
|
+
},
|
139
|
+
'returns_sass_list()': lambda {
|
140
|
+
Sass::EmbeddedProtocol::Value.new(
|
141
|
+
list: Sass::EmbeddedProtocol::Value::List.new(
|
142
|
+
separator: Sass::EmbeddedProtocol::ListSeparator::COMMA,
|
143
|
+
has_brackets: true,
|
144
|
+
contents: [
|
145
|
+
Sass::EmbeddedProtocol::Value.new(
|
146
|
+
number: Sass::EmbeddedProtocol::Value::Number.new(
|
147
|
+
value: 10
|
148
|
+
)
|
149
|
+
),
|
150
|
+
Sass::EmbeddedProtocol::Value.new(
|
151
|
+
number: Sass::EmbeddedProtocol::Value::Number.new(
|
152
|
+
value: 20
|
153
|
+
)
|
154
|
+
),
|
155
|
+
Sass::EmbeddedProtocol::Value.new(
|
156
|
+
number: Sass::EmbeddedProtocol::Value::Number.new(
|
157
|
+
value: 30
|
158
|
+
)
|
159
|
+
)
|
160
|
+
]
|
161
|
+
)
|
162
|
+
)
|
163
|
+
}
|
164
|
+
}
|
165
|
+
})[:css]
|
149
166
|
end
|
150
167
|
|
151
168
|
def test_functions_may_return_sass_string_type
|
@@ -253,8 +270,8 @@ module Sass
|
|
253
270
|
end
|
254
271
|
|
255
272
|
def test_function_with_error
|
256
|
-
|
257
|
-
render(
|
273
|
+
assert_raises(Sass::CompilationError) do
|
274
|
+
render('div {url: function_that_raises_errors();}')
|
258
275
|
end
|
259
276
|
end
|
260
277
|
|
@@ -301,28 +318,27 @@ module Sass
|
|
301
318
|
end
|
302
319
|
|
303
320
|
def test_concurrency
|
304
|
-
skip 'ProtocolError: Bad state: Future already completed'
|
305
321
|
10.times do
|
306
322
|
threads = []
|
307
|
-
|
323
|
+
10.times do |i|
|
308
324
|
threads << Thread.new(i) do |id|
|
309
325
|
output = @compiler.render({
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
assert_match
|
323
|
-
assert_match
|
324
|
-
assert_match
|
325
|
-
assert_match
|
326
|
+
data: 'div { url: test-function() }',
|
327
|
+
functions: {
|
328
|
+
'test_function()': lambda {
|
329
|
+
Sass::EmbeddedProtocol::Value.new(
|
330
|
+
string: Sass::EmbeddedProtocol::Value::String.new(
|
331
|
+
text: "{test_key1: 'test_value', test_key2: #{id}}",
|
332
|
+
quoted: true
|
333
|
+
)
|
334
|
+
)
|
335
|
+
}
|
336
|
+
}
|
337
|
+
})[:css]
|
338
|
+
assert_match(/test_key1/, output)
|
339
|
+
assert_match(/test_key2/, output)
|
340
|
+
assert_match(/test_value/, output)
|
341
|
+
assert_match(/#{id}/, output)
|
326
342
|
end
|
327
343
|
end
|
328
344
|
threads.each(&:join)
|
@@ -331,32 +347,32 @@ module Sass
|
|
331
347
|
|
332
348
|
def test_pass_custom_functions_as_a_parameter
|
333
349
|
output = @compiler.render({
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
350
|
+
data: 'div { url: test-function(); }',
|
351
|
+
functions: {
|
352
|
+
'test_function()': lambda {
|
353
|
+
Sass::EmbeddedProtocol::Value.new(
|
354
|
+
string: Sass::EmbeddedProtocol::Value::String.new(
|
355
|
+
text: 'custom_function',
|
356
|
+
quoted: true
|
357
|
+
)
|
358
|
+
)
|
359
|
+
}
|
360
|
+
}
|
361
|
+
})[:css]
|
346
362
|
|
347
|
-
assert_match
|
363
|
+
assert_match(/custom_function/, output)
|
348
364
|
end
|
349
365
|
|
350
366
|
def test_pass_incompatible_type_to_custom_functions
|
351
367
|
assert_raises(CompilationError) do
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
368
|
+
@compiler.render({
|
369
|
+
data: 'div { url: test-function(); }',
|
370
|
+
functions: {
|
371
|
+
'test_function()': lambda {
|
372
|
+
Class.new
|
373
|
+
}
|
374
|
+
}
|
375
|
+
})[:css]
|
360
376
|
end
|
361
377
|
end
|
362
378
|
|
@@ -364,8 +380,8 @@ module Sass
|
|
364
380
|
|
365
381
|
def assert_sass(sass, expected_css)
|
366
382
|
output = render(sass)
|
367
|
-
assert_equal expected_css.strip.gsub!(/\s+/,
|
368
|
-
output.strip.gsub!(/\s+/,
|
383
|
+
assert_equal expected_css.strip.gsub!(/\s+/, ' '), # poor man's String#squish
|
384
|
+
output.strip.gsub!(/\s+/, ' ')
|
369
385
|
end
|
370
386
|
|
371
387
|
def stderr_output
|