Permalink
Browse files

tests for unsupported content headers

  • Loading branch information...
1 parent 7e56285 commit 06a4e95eb1cdf27414ce0bc03358cb7887252e13 @sdelano sdelano committed Oct 13, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 spec/driver_spec.rb
View
@@ -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

0 comments on commit 06a4e95

Please sign in to comment.