[rspec-users] specifying an HTTP status code

Jarkko Laine jarkko at jlaine.net
Sat Dec 1 17:10:36 EST 2007


On 1.12.2007, at 23.27, Scott Taylor wrote:
>  it "should return an HTTP status code of 404" do
>    get :view
>    response.headers["Status"].should == "404 Not Found"

or

response.response_code.should == 404

--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http://www.railsecommerce.com
http://odesign.fi




More information about the rspec-users mailing list