Skip to content

Instantly share code, notes, and snippets.

@joefiorini
Created November 26, 2008 01:28
Show Gist options
  • Save joefiorini/29222 to your computer and use it in GitHub Desktop.
Save joefiorini/29222 to your computer and use it in GitHub Desktop.
describe "handling GET /groups/not_found.xml 404" do
def do_get
request.env["HTTP_ACCEPT"] = "application/xml"
get :show, :id => "not_found"
end
it "should 404 if given group that doesn't exist" do
Group.stub!(:find_by_permalink!).and_return(nil)
do_get
response.code.should == "404"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment