Required Files
- active_support/test_case
- action_controller
Methods
Public Instance methods
reference the global "app" instance, created on demand. To recreate the instance, pass a non-false value as the parameter.
[ show source ]
# File railties/lib/console_app.rb, line 9 9: def app(create=false) 10: @app_integration_instance = nil if create 11: @app_integration_instance ||= new_session do |sess| 12: sess.host! "www.example.com" 13: end 14: end
create a new session. If a block is given, the new session will be yielded to the block before being returned.
[ show source ]
# File railties/lib/console_app.rb, line 18 18: def new_session 19: session = ActionController::Integration::Session.new 20: yield session if block_given? 21: session 22: end
reloads the environment
[ show source ]
# File railties/lib/console_app.rb, line 25 25: def reload! 26: puts "Reloading..." 27: Dispatcher.cleanup_application 28: Dispatcher.reload_application 29: true 30: end