Created
November 11, 2008 05:57
-
-
Save jackdempsey/23761 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def show | |
| puts "in show with params #{params.inspect}" | |
| @gist = Gist.get(params[:id]) | |
| puts "gist is #{@gist.inspect}" | |
| raise NotFound unless @gist | |
| display @gist | |
| end | |
| =============== | |
| describe "#show" do | |
| it "should display an item when found" do | |
| gist = Gist.create(:url => 'www.example.com') | |
| request("/gists/#{gist.id}.json").should be_successful | |
| end | |
| it "should raise a NotFound when item is not found" do | |
| @body = request("/gists/bad_id.json") | |
| puts "the body is #{@body}" | |
| end | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment