Sha256: 9c78df8e5b3ed5e5b15fb4897fe561c6b76c3f11b4c6b2a8d0e1148447aa2ade

Contents?: true

Size: 633 Bytes

Versions: 4

Compression:

Stored size: 633 Bytes

Contents

# Load the plugin testing framework
$:.unshift("#{File.dirname(__FILE__)}/../../plugin_test_helper/lib")
require 'rubygems'
require 'plugin_test_helper'

Test::Unit::TestCase.class_eval do
  def setup
    request = ActionController::TestRequest.new
    request.request_uri = '/contact'
    request.path_parameters = {:action => 'index', :controller => 'contact'}
    
    @controller = ContactController.new
    @controller.request = request
    @controller.instance_eval {@_params = request.path_parameters}
    @controller.send(:initialize_current_url)
  end
  
  def teardown
    ActionController::Routing::Routes.load!
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
menu_helper-0.3.1 test/test_helper.rb
menu_helper-0.1.0 test/test_helper.rb
menu_helper-0.2.0 test/test_helper.rb
menu_helper-0.3.0 test/test_helper.rb