test/test_helper.rb in menu_builder-0.4.4 vs test/test_helper.rb in menu_builder-0.5

- old
+ new

@@ -1,21 +1,28 @@ -require 'rubygems' -require 'test/unit' +require "rubygems" -require 'action_controller' -require 'action_view' -require 'action_view/template' -require 'active_support' -require 'rails/railtie' +require "active_support/testing/autorun" +require "abstract_controller" +require "abstract_controller/railties/routes_helpers" +require "action_controller" +require "action_view" +require "action_view/testing/resolvers" +require "action_dispatch" +require "active_support/dependencies" +require "rails-controller-testing" -$:.unshift File.expand_path(File.dirname(__FILE__) + '/../lib') -require 'menu_builder' +module Rails + class << self + def env + @_env ||= ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "test") + end -Dir["#{File.dirname(__FILE__)}/support/*.rb"].each { |f| require f } - -MenuBuilder::Routes = ActionDispatch::Routing::RouteSet.new -MenuBuilder::Routes.draw do - match ':controller(/:action(/:id(.:format)))' + def root; end + end end -class ApplicationController < ActionController::Base; end -ActionController::Base.send :include, MenuBuilder::Routes.url_helpers \ No newline at end of file +Rails::Controller::Testing.install + +$LOAD_PATH.unshift File.expand_path("#{File.dirname(__FILE__)}/../lib") +require "menu_builder" + +Dir["#{File.dirname(__FILE__)}/support/*.rb"].each { |f| require f }