Methods
- A
- E
- G
Instance Public methods
app(env = "production")
Link
# 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)
Link
assert_header(key, value, resp)
Link
assert_missing(resp)
Link
assert_success(resp)
Link
assert_welcome(resp)
Link
# 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)
Link