Skip to content

Instantly share code, notes, and snippets.

@mfilej
Created June 5, 2013 14:47
Show Gist options
  • Save mfilej/5714404 to your computer and use it in GitHub Desktop.
Save mfilej/5714404 to your computer and use it in GitHub Desktop.
require "spec_helper"
describe Api::ArtistsController do
let(:artist) { double :artist, id: '1', to_json: '' }
describe "#show" do
it "renders the json representation of a given artist" do
Artist.stub(:find).with('1') { artist }
get :show, id: '1', format: 'json'
response.status.should eq 200
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment