From 06a4e95eb1cdf27414ce0bc03358cb7887252e13 Mon Sep 17 00:00:00 2001 From: Stephen Delano Date: Wed, 12 Oct 2011 20:26:50 -0700 Subject: [PATCH] tests for unsupported content headers --- spec/driver_spec.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/driver_spec.rb b/spec/driver_spec.rb index 1ee0ec71..7ffaee7e 100644 --- a/spec/driver_spec.rb +++ b/spec/driver_spec.rb @@ -140,12 +140,16 @@ @app = lambda do |env| [200, {"Content-Type" => "text/css", "Content-Length" => body.length.to_s}, [body]] end + subject.visit("/") end it "renders unsupported content types gracefully" do - subject.visit("/") subject.body.should =~ /css/ end + + it "sets the response headers with respect to the unsupported request" do + subject.response_headers["Content-Type"].should == "text/css" + end end context "hello app" do