2222class JSXTransformTest < ActionDispatch ::IntegrationTest
2323
2424 test 'asset pipeline should transform JSX' do
25- get 'assets/example.js'
25+ get '/ assets/example.js'
2626 FileUtils . rm_r CACHE_PATH if CACHE_PATH . exist?
2727 assert_response :success
2828 assert_equal EXPECTED_JS , @response . body
2929 end
3030
3131 test 'asset pipeline should transform JSX + Coffeescript' do
32- get 'assets/example2.js'
32+ get '/ assets/example2.js'
3333 assert_response :success
3434 # Different coffee-script may generate slightly different outputs,
3535 # as some version inserts an extra "\n" at the beginning.
@@ -43,7 +43,7 @@ class JSXTransformTest < ActionDispatch::IntegrationTest
4343 replacing_path = File . expand_path ( "../dummy/vendor/assets/react/JSXTransformer.js" , __FILE__ )
4444
4545 FileUtils . mv hidden_path , replacing_path
46- get 'assets/example3.js'
46+ get '/ assets/example3.js'
4747
4848 FileUtils . mv replacing_path , hidden_path
4949 FileUtils . rm_r CACHE_PATH if CACHE_PATH . exist?
@@ -54,7 +54,7 @@ class JSXTransformTest < ActionDispatch::IntegrationTest
5454
5555 test 'accepts harmony: true option' do
5656 React ::JSX . transform_options = { harmony : true }
57- get 'assets/harmony_example.js'
57+ get '/ assets/harmony_example.js'
5858 assert_response :success
5959 assert_match ( /generateGreeting:function\( \) / , @response . body , "object literal methods" )
6060 assert_match ( /React.__spread/ , @response . body , "spreading props" )
0 commit comments