Skip to content

Commit 98aa77d

Browse files
committed
try to fix tests
1 parent 4046eec commit 98aa77d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test/jsxtransform_test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
class 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")

test/react_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class ReactTest < ActionDispatch::IntegrationTest
1010
react_file_token = "'test_confirmation_token_react_content_non_production';\n";
1111
File.open(actual_react_file_path, 'w') {|f| f.write react_file_token}
1212

13-
get 'assets/react.js'
13+
get '/assets/react.js'
1414

1515
File.open(actual_react_file_path, 'w') {|f| f.write actual_react_file_content}
1616
FileUtils.rm_r CACHE_PATH if CACHE_PATH.exist?
@@ -24,7 +24,7 @@ class ReactTest < ActionDispatch::IntegrationTest
2424
replacing_path = File.expand_path("../dummy/vendor/assets/react/test/react.js", __FILE__)
2525

2626
FileUtils.mv hidden_path, replacing_path
27-
get 'assets/react.js'
27+
get '/assets/react.js'
2828

2929
FileUtils.mv replacing_path, hidden_path
3030
FileUtils.rm_r CACHE_PATH if CACHE_PATH.exist?

0 commit comments

Comments
 (0)