```ruby
ENV["RAILS_ENV"] ||= "test"
require File.expand_path('../../config/environment', __FILE__)

require 'minitest/autorun'
require 'rails/test_help'
require 'rr'
require 'capybara/rails'
require 'clearance/test_unit'
require 'rubygems/package'
require 'shoulda'

require 'helpers/gem_helpers'

I18n.enforce_available_locales = false

# Shim for compatibility with older versions of MiniTest
MiniTest::Test = MiniTest::Unit::TestCase unless defined?(MiniTest::Test)

class MiniTest::Test
  include Rack::Test::Methods
  include FactoryGirl::Syntax::Methods
  include GemHelpers

  def setup
    RR.reset
    $redis.flushdb
    $fog.directories.create(:key => $rubygems_config[:s3_bucket], :public => true)
  end

  def page
    Capybara::Node::Simple.new(@response.body)
  end

  def assert_changed(object, attribute, &block)
    original = object.send(attribute)
    yield
    latest = object.reload.send(attribute)
    assert_not_equal original, latest,
      "Expected #{object.class} #{attribute} to change but still #{latest}"
  end
end

class SystemTest < ActionDispatch::IntegrationTest
  include Capybara::DSL
end
```

Add workaround minitest 4 + rr bug
user
```ruby
ENV["RAILS_ENV"] ||= "test"
require File.expand_path('../../config/environment', __FILE__)

require 'minitest/autorun'
# Workaround https://github.com/rr/rr/pull/60
Minitest::VERSION = Minitest::Unit::VERSION unless defined?(Minitest::VERSION)
require 'rails/test_help'
require 'rr'
require 'capybara/rails'
require 'clearance/test_unit'
require 'rubygems/package'
require 'shoulda'

require 'helpers/gem_helpers'

I18n.enforce_available_locales = false

# Shim for compatibility with older versions of MiniTest
MiniTest::Test = MiniTest::Unit::TestCase unless defined?(MiniTest::Test)

class MiniTest::Test
  include Rack::Test::Methods
  include FactoryGirl::Syntax::Methods
  include GemHelpers

  def setup
    RR.reset
    $redis.flushdb
    $fog.directories.create(:key => $rubygems_config[:s3_bucket], :public => true)
  end

  def page
    Capybara::Node::Simple.new(@response.body)
  end

  def assert_changed(object, attribute, &block)
    original = object.send(attribute)
    yield
    latest = object.reload.send(attribute)
    assert_not_equal original, latest,
      "Expected #{object.class} #{attribute} to change but still #{latest}"
  end
end

class SystemTest < ActionDispatch::IntegrationTest
  include Capybara::DSL
end
```
assistant