Last active
December 17, 2015 11:39
-
-
Save andreaseriksson/5604414 to your computer and use it in GitHub Desktop.
RSPEC Controller spec #SHOW
This file contains 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
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