Methods
A
E
G
Instance Public methods
app(env = "production")
# File railties/test/isolation/abstract_unit.rb, line 50
def app(env = "production")
  old_env = ENV["RAILS_ENV"]
  @app ||= begin
    ENV["RAILS_ENV"] = env

    # FIXME: shush Sass warning spam, not relevant to testing Railties
    Kernel.silence_warnings do
      require "#{app_path}/config/environment"
    end

    Rails.application
  end
ensure
  ENV["RAILS_ENV"] = old_env
end
assert_body(expected, resp)
# File railties/test/isolation/abstract_unit.rb, line 97
def assert_body(expected, resp)
  assert_equal expected, extract_body(resp)
end
assert_header(key, value, resp)
# File railties/test/isolation/abstract_unit.rb, line 93
def assert_header(key, value, resp)
  assert_equal value, resp[1][key.to_s]
end
assert_missing(resp)
# File railties/test/isolation/abstract_unit.rb, line 89
def assert_missing(resp)
  assert_equal 404, resp[0]
end
assert_success(resp)
# File railties/test/isolation/abstract_unit.rb, line 85
def assert_success(resp)
  assert_equal 202, resp[0]
end
assert_welcome(resp)
# File railties/test/isolation/abstract_unit.rb, line 76
def assert_welcome(resp)
  resp = Array(resp)

  assert_equal 200, resp[0]
  assert_match 'text/html', resp[1]["Content-Type"]
  assert_match 'charset=utf-8', resp[1]["Content-Type"]
  assert extract_body(resp).match(/Yay! You.*re on Rails!/)
end
extract_body(response)
# File railties/test/isolation/abstract_unit.rb, line 66
def extract_body(response)
  "".tap do |body|
    response[2].each {|chunk| body << chunk }
  end
end
get(path)
# File railties/test/isolation/abstract_unit.rb, line 72
def get(path)
  @app.call(::Rack::MockRequest.env_for(path))
end