Skip to content

Instantly share code, notes, and snippets.

@andreaseriksson
Last active December 17, 2015 11:39
Show Gist options
  • Save andreaseriksson/5604414 to your computer and use it in GitHub Desktop.
Save andreaseriksson/5604414 to your computer and use it in GitHub Desktop.
RSPEC Controller spec #SHOW
describe 'GET#show' do
it "assigns the requested message to @message" do
message = create(:message)
get :show, id: message
expect(assigns(:message)).to eq message
end
it "renders the :show template" do
message = create(:message)
get :show, id: message
expect(response).to render_template :show
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment