Sha256: 7168ce65230ae58e40adde15a911159d0b04761863f0db85c17e173feafd3e8a

Contents?: true

Size: 675 Bytes

Versions: 2

Compression:

Stored size: 675 Bytes

Contents

Ramenu::Routes = ActionDispatch::Routing::RouteSet.new
Ramenu::Routes.draw do
  match ':controller(/:action(/:id))'
end

ActionController::Base.view_paths = File.join(File.dirname(__FILE__), 'views')
ActionController::Base.send :include, Ramenu::Routes.url_helpers

class ActiveSupport::TestCase

  setup do
    @routes = Ramenu::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

2 entries across 2 versions & 1 rubygems

Version Path
ramenu-3.0.1 test/dummy.rb
ramenu-3.0.0 test/dummy.rb