Sha256: bba1338713f25c19d6b4a877f0d24b78f7b250627d79a53c7b19efa643f01b02
Contents?: true
Size: 785 Bytes
Versions: 3
Compression:
Stored size: 785 Bytes
Contents
ENV["RAILS_ENV"] = "test" require "active_support" require "action_controller" require "rails/railtie" class Dummy Routes = ActionDispatch::Routing::RouteSet.new Routes.draw do match ':controller(/:action(/:id))' end end ActionController::Base.view_paths = File.join(File.dirname(__FILE__), 'views') ActionController::Base.send :include, Dummy::Routes.url_helpers class ActiveSupport::TestCase setup do @routes = Dummy::Routes end def controller @controller_proxy ||= ControllerProxy.new(@controller) end class ControllerProxy def initialize(controller) @controller = controller end def method_missing(method, *args) @controller.instance_eval do m = method(method) m.call(*args) end end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
tabs_on_rails-2.2.0 | test/dummy.rb |
breadcrumbs_on_rails-2.3.0 | test/dummy.rb |
tabs_on_rails-2.1.1 | test/dummy.rb |