@@ -32,18 +32,6 @@ class JSXTransformTest < ActionDispatch::IntegrationTest
32
32
FileUtils . rm_r CACHE_PATH if CACHE_PATH . exist?
33
33
end
34
34
35
- test 'can use dropped in version of JSX transformer' do
36
- hidden_path = File . expand_path ( "../dummy/vendor/assets/react/JSXTransformer__.js" , __FILE__ )
37
- replacing_path = File . expand_path ( "../dummy/vendor/assets/react/JSXTransformer.js" , __FILE__ )
38
-
39
- FileUtils . mv hidden_path , replacing_path
40
- get 'assets/example2.js'
41
- assert_response :success
42
- assert_equal 'test_confirmation_token_jsx_transformed;' , @response . body
43
- FileUtils . mv replacing_path , hidden_path
44
- FileUtils . rm_r CACHE_PATH if CACHE_PATH . exist?
45
- end
46
-
47
35
test 'asset pipeline should transform JSX + Coffeescript' do
48
36
get 'assets/example2.js'
49
37
assert_response :success
@@ -56,4 +44,15 @@ class JSXTransformTest < ActionDispatch::IntegrationTest
56
44
assert_equal EXPECTED_JS_2 . gsub ( /\s / , '' ) , @response . body . gsub ( /\s / , '' )
57
45
end
58
46
47
+ test 'can use dropped in version of JSX transformer' do
48
+ hidden_path = File . expand_path ( "../dummy/vendor/assets/react/JSXTransformer__.js" , __FILE__ )
49
+ replacing_path = File . expand_path ( "../dummy/vendor/assets/react/JSXTransformer.js" , __FILE__ )
50
+
51
+ FileUtils . mv hidden_path , replacing_path
52
+ get 'assets/example3.js'
53
+ assert_response :success
54
+ assert_equal 'test_confirmation_token_jsx_transformed;' , @response . body
55
+ FileUtils . mv replacing_path , hidden_path
56
+ FileUtils . rm_r CACHE_PATH if CACHE_PATH . exist?
57
+ end
59
58
end
0 commit comments