Sha256: d48dc0afafdd764af17da29357ddb52c16730d878e7fc4052c850ce6193926a8
Contents?: true
Size: 679 Bytes
Versions: 1
Compression:
Stored size: 679 Bytes
Contents
require 'spec_helper' require 'action_controller' describe Fozzie::Rails::Middleware do subject do RailsApp = Class.new do def call(env) env end end unless defined?(RailsApp) Fozzie::Rails::Middleware.new RailsApp.new end describe "subject" do it "returns env on call for testing" do subject.call({}).should == {} end end it "#generate_key" do s = '/somewhere/railsy' fake_env = { 'PATH_INFO' => s } ActionController::Routing::Routes.expects(:recognize_path).with(s).returns({:controller => 'somewhere', :action => 'railsy'}) subject.generate_key(fake_env).should == 'somewhere.railsy.render' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fozzie-0.0.6 | spec/lib/fozzie/rails/middleware_spec.rb |