test/test_helper.rb in menu_helper-0.0.5 vs test/test_helper.rb in menu_helper-0.1.0
- old
+ new
@@ -1,16 +1,21 @@
# Load the plugin testing framework
$:.unshift("#{File.dirname(__FILE__)}/../../plugin_test_helper/lib")
require 'rubygems'
require 'plugin_test_helper'
-class Test::Unit::TestCase
+Test::Unit::TestCase.class_eval do
def setup
request = ActionController::TestRequest.new
request.request_uri = '/contact'
request.path_parameters = {:action => 'index', :controller => 'contact'}
- @controller = HomeController.new
+
+ @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