module Rails::Controller::Testing::TestProcess

Public Instance Methods

assigns(key = nil) click to toggle source
# File lib/rails/controller/testing/test_process.rb, line 7
def assigns(key = nil)
  assigns = {}.with_indifferent_access
  @controller.view_assigns.each { |k, v| assigns.regular_writer(k, v) }
  key.nil? ? assigns : assigns[key]
end