Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/jsxtransform_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
class JSXTransformTest < ActionDispatch::IntegrationTest

test 'asset pipeline should transform JSX' do
get 'assets/example.js'
get '/assets/example.js'
FileUtils.rm_r CACHE_PATH if CACHE_PATH.exist?
assert_response :success
assert_equal EXPECTED_JS, @response.body
end

test 'asset pipeline should transform JSX + Coffeescript' do
get 'assets/example2.js'
get '/assets/example2.js'
assert_response :success
# Different coffee-script may generate slightly different outputs,
# as some version inserts an extra "\n" at the beginning.
Expand All @@ -43,7 +43,7 @@ class JSXTransformTest < ActionDispatch::IntegrationTest
replacing_path = File.expand_path("../dummy/vendor/assets/react/JSXTransformer.js", __FILE__)

FileUtils.mv hidden_path, replacing_path
get 'assets/example3.js'
get '/assets/example3.js'

FileUtils.mv replacing_path, hidden_path
FileUtils.rm_r CACHE_PATH if CACHE_PATH.exist?
Expand Down
4 changes: 2 additions & 2 deletions test/react_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ReactTest < ActionDispatch::IntegrationTest
react_file_token = "'test_confirmation_token_react_content_non_production';\n";
File.open(actual_react_file_path, 'w') {|f| f.write react_file_token}

get 'assets/react.js'
get '/assets/react.js'

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

FileUtils.mv hidden_path, replacing_path
get 'assets/react.js'
get '/assets/react.js'

FileUtils.mv replacing_path, hidden_path
FileUtils.rm_r CACHE_PATH if CACHE_PATH.exist?
Expand Down