spec/lib/fozzie/rails/middleware_spec.rb in fozzie-0.0.6 vs spec/lib/fozzie/rails/middleware_spec.rb in fozzie-0.0.7

- old
+ new

@@ -22,7 +22,14 @@ 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 + + it "returns nil on routing error" do + s = '/somewhere/railsy' + fake_env = { 'PATH_INFO' => s } + ActionController::Routing::Routes.expects(:recognize_path).with(s).raises(ArgumentError) + subject.generate_key(fake_env).should == nil + end end \ No newline at end of file