@@ -26,7 +26,7 @@ def transform(code)
2626 end
2727end
2828
29- when_sprockets_available do
29+ SprocketsHelpers . when_available do
3030 class JSXTransformTest < ActionDispatch ::IntegrationTest
3131 setup do
3232 reset_transformer
@@ -37,30 +37,30 @@ class JSXTransformTest < ActionDispatch::IntegrationTest
3737 end
3838
3939 test 'asset pipeline should transform JSX' do
40- manually_expire_asset ( 'example.js' )
40+ SprocketsHelpers . manually_expire_asset ( 'example.js' )
4141 get '/assets/example.js'
4242 assert_response :success
4343 assert_compiled_javascript_matches ( EXPECTED_JS , @response . body )
4444 end
4545
4646 test 'asset pipeline should transform JSX + Coffeescript' do
47- manually_expire_asset ( 'example2.js' )
47+ SprocketsHelpers . manually_expire_asset ( 'example2.js' )
4848 get '/assets/example2.js'
4949 assert_response :success
5050 assert_compiled_javascript_matches ( EXPECTED_JS_2 , @response . body )
5151 end
5252
5353 test 'use a custom transformer' do
5454 React ::JSX . transformer_class = NullTransformer
55- manually_expire_asset ( 'example2.js' )
55+ SprocketsHelpers . manually_expire_asset ( 'example2.js' )
5656 get '/assets/example2.js'
5757
5858 assert_equal "TRANSFORMED CODE!;\n " , @response . body
5959 end
6060
6161 def test_babel_transformer_accepts_babel_transformation_options
6262 React ::JSX . transform_options = { blacklist : [ 'spec.functionName' , 'validation.react' , "strict" ] }
63- manually_expire_asset ( 'example.js' )
63+ SprocketsHelpers . manually_expire_asset ( 'example.js' )
6464 get '/assets/example.js'
6565 assert_response :success
6666
0 commit comments