Module: ActionDispatch::TestProcess

Includes:
FixtureFile
Included in:
ActionController::TestCase::Behavior, Integration::Session, ActionView::TestCase::Behavior, ActionView::TestCase::TestController
Defined in:
actionpack/lib/action_dispatch/testing/test_process.rb

Defined Under Namespace

Modules: FixtureFile

Instance Method Summary collapse

Methods included from FixtureFile

#fixture_file_upload

Instance Method Details

#assigns(key = nil) ⇒ Object

Raises:

  • (NoMethodError)


28
29
30
31
32
# File 'actionpack/lib/action_dispatch/testing/test_process.rb', line 28

def assigns(key = nil)
  raise NoMethodError,
    "assigns has been extracted to a gem. To continue using it,
    add `gem 'rails-controller-testing'` to your Gemfile."
end

#cookiesObject



42
43
44
# File 'actionpack/lib/action_dispatch/testing/test_process.rb', line 42

def cookies
  @cookie_jar ||= Cookies::CookieJar.build(@request, @request.cookies)
end

#flashObject



38
39
40
# File 'actionpack/lib/action_dispatch/testing/test_process.rb', line 38

def flash
  @request.flash
end

#redirect_to_urlObject



46
47
48
# File 'actionpack/lib/action_dispatch/testing/test_process.rb', line 46

def redirect_to_url
  @response.redirect_url
end

#sessionObject



34
35
36
# File 'actionpack/lib/action_dispatch/testing/test_process.rb', line 34

def session
  @request.session
end