Sha256: 993cc78b796e0f5e8dfefb09e68319f21f4f4b01b0630390b56f07033f184b9f
Contents?: true
Size: 1012 Bytes
Versions: 2
Compression:
Stored size: 1012 Bytes
Contents
require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper") module TrueWeb describe Controller do describe "GET /authentication/error-page" do context "when there is not a rack.logger" do it "responds with a 500" do any_instance_of(FixtureApp::Controller) do |controller| stub.proxy(controller).env do |env| env.delete("rack.logger") env end end get uris.authentication_error_page response.status.should == 500 end end context "when there is a rack.logger" do it "responds with a 500 and logs the message" do message = nil any_instance_of(Logger) do |l| stub(l).error(is_a(String)) do |*args| message = args.first end end get uris.authentication_error_page response.status.should == 500 message.should include("An Error") end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
true-web-0.1.5 | spec/true-web/controller_spec.rb |
true-web-0.1.4 | spec/true-web/controller_spec.rb |