```ruby
require 'test_helper'
require 'fileutils'

class ReactTest < ActionDispatch::IntegrationTest
  test 'asset pipeline should deliver drop-in react file replacement' do
    app_react_file_path = File.expand_path("../dummy/vendor/assets/javascripts/react.js",  __FILE__)

    react_file_token = "'test_confirmation_token_react_content_non_production';\n";
    File.write(app_react_file_path, react_file_token)

    get '/assets/react.js'

    File.unlink(app_react_file_path)
    FileUtils.rm_r CACHE_PATH if CACHE_PATH.exist?

    assert_response :success
    assert_equal react_file_token, @response.body
  end

  test 'precompiling assets works' do
    begin
      ENV['RAILS_GROUPS'] = 'assets' # required for Rails 3.2
      Dummy::Application.load_tasks
      Rake::Task['assets:precompile'].invoke
      FileUtils.rm_r(File.expand_path("../dummy/public/assets", __FILE__))
    ensure
      ENV.delete('RAILS_GROUPS')
    end
  end
end
```

Test that the proper version of react is found by sprockets
user
```ruby
require 'test_helper'
require 'fileutils'

class ReactTest < ActionDispatch::IntegrationTest
  test 'asset pipeline should deliver drop-in react file replacement' do
    app_react_file_path = File.expand_path("../dummy/vendor/assets/javascripts/react.js",  __FILE__)

    react_file_token = "'test_confirmation_token_react_content_non_production';\n";
    File.write(app_react_file_path, react_file_token)

    get '/assets/react.js'

    File.unlink(app_react_file_path)
    FileUtils.rm_r CACHE_PATH if CACHE_PATH.exist?

    assert_response :success
    assert_equal react_file_token, @response.body
  end

  test 'precompiling assets works' do
    begin
      ENV['RAILS_GROUPS'] = 'assets' # required for Rails 3.2
      Dummy::Application.load_tasks
      Rake::Task['assets:precompile'].invoke
      FileUtils.rm_r(File.expand_path("../dummy/public/assets", __FILE__))
    ensure
      ENV.delete('RAILS_GROUPS')
    end
  end

  test "the development version is loaded" do
    asset = Rails.application.assets.find_asset('react')
    assert asset.pathname.to_s.end_with?('development/react.js')
  end
end
```
assistant