Sha256: 919d5db6567b220cd6d80ca0dab690c21d01e026dcf83f9fea2c935bac2dcbd2

Contents?: true

Size: 840 Bytes

Versions: 62

Compression:

Stored size: 840 Bytes

Contents

require 'active_support/test_case'
require 'action_controller'

# work around the at_exit hook in test/unit, which kills IRB
Test::Unit.run = true if Test::Unit.respond_to?(:run=)

# reference the global "app" instance, created on demand. To recreate the
# instance, pass a non-false value as the parameter.
def app(create=false)
  @app_integration_instance = nil if create
  @app_integration_instance ||= new_session do |sess|
    sess.host! "www.example.com"
  end
end

# create a new session. If a block is given, the new session will be yielded
# to the block before being returned.
def new_session
  session = ActionController::Integration::Session.new
  yield session if block_given?
  session
end

#reloads the environment
def reload!
  puts "Reloading..."
  Dispatcher.cleanup_application
  Dispatcher.reload_application
  true
end

Version data entries

62 entries across 62 versions & 11 rubygems

Version Path
rails-2.3.18 lib/console_app.rb
rails_csi-2.3.5.p8 lib/console_app.rb
rails-2.3.17 lib/console_app.rb
rails_csi-2.3.5.p7 lib/console_app.rb
rails_csi-2.3.5.p6 lib/console_app.rb
rails-2.3.16 lib/console_app.rb
rails-2.3.15 lib/console_app.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/rails-2.3.14/lib/console_app.rb
vanity-1.7.1 vendor/ruby/1.9.1/gems/rails-2.3.12/lib/console_app.rb
rails-2.3.14 lib/console_app.rb
kajam-1.0.3.rc2 vendor/rails/railties/lib/console_app.rb
rails-2.3.12 lib/console_app.rb
radiant-1.0.0.rc2 vendor/rails/railties/lib/console_app.rb
radiant-1.0.0.rc1 vendor/rails/railties/lib/console_app.rb
webroar-0.5.0 src/admin_panel/vendor/rails/railties/lib/console_app.rb
rails-2.3.11 lib/console_app.rb
radiantcms-couchrest_model-0.2.4 vendor/rails/railties/lib/console_app.rb
radiantcms-couchrest_model-0.2.2 vendor/rails/railties/lib/console_app.rb
radiantcms-couchrest_model-0.2.1 vendor/rails/railties/lib/console_app.rb
radiantcms-couchrest_model-0.2 vendor/rails/railties/lib/console_app.rb