faithfulgeek (owner)

Revisions

gist: 29222 Download_button fork
public
Public Clone URL: git://gist.github.com/29222.git
Embed All Files: show embed
spec.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  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