Sha256: 677f2892060c52fb86d341ad319db59d78856bd9445dcb1cdf601d5ed52ae3f1
Contents?: true
Size: 453 Bytes
Versions: 3
Compression:
Stored size: 453 Bytes
Contents
# encoding: utf-8 require "rack/mock" class Factory class << self def rack_env(environment = Hash.new) {"PATH_INFO" => "/blog/post/a-slug", "REQUEST_METHOD" => "GET"}.merge(environment) end def request require "rango/rack/request" Rango::Request.new(self.rack_env) end def controller require "rango/controller" params = Hash.new Rango::Controller.new(self.request, params) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rango-0.1.0 | spec/factories.rb |
rango-0.0.6 | spec/factories.rb |
rango-0.1.pre | spec/factories.rb |