Skip to content

Commit 1d0612c

Browse files
committed
> When calling the process helpers in an integration test the path needs to have a leading slash. > Previously you could omit it but that was a byproduct of the implementation and > not an intentional feature. - Fixed all get requests to have a forward slash to fix failing tests on rails 4.2
1 parent 124299a commit 1d0612c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/jsxtransform_test.rb

Lines changed: 3 additions & 3 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?

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)