Skip to content

Commit 261a2c9

Browse files
committed
Fix failing Travis tests due to coffee-script version mismatch
1 parent 272a40b commit 261a2c9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/jsxtransform_test.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ class JSXTransformTest < ActionDispatch::IntegrationTest
3434
test 'asset pipeline should transform JSX + Coffeescript' do
3535
get 'assets/example2.js'
3636
assert_response :success
37-
assert_equal EXPECTED_JS_2, @response.body
37+
38+
# Different coffee-script may generate slightly different outputs:
39+
# 1. Some version inserts an extra "\n" at the beginning.
40+
# 2. "/** @jsx React.DOM */" and "/** @jsx React.DOM*/" are both possible.
41+
#
42+
# Because appraisal is used, multiple versions of coffee-script are treated
43+
# together. Remove all spaces to make test pass.
44+
assert_equal EXPECTED_JS_2.gsub(/\s/, ''), @response.body.gsub(/\s/, '')
3845
end
3946

4047
end

0 commit comments

Comments
 (0)