Skip to content

Instantly share code, notes, and snippets.

@andreaseriksson
Created May 18, 2013 13:39
Show Gist options
  • Save andreaseriksson/5604420 to your computer and use it in GitHub Desktop.
Save andreaseriksson/5604420 to your computer and use it in GitHub Desktop.
RSPEC Controller spec #EDIT
describe 'GET#edit' do
it "assigns the requested message to @message" do
message = create(:message)
get :edit, id: message
expect(assigns(:message)).to eq message
end
it "renders the :edit template" do
message = create(:message)
get :edit, id: message
expect(response).to render_template :edit
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment