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 'POST #create' do | |
let(:create_request) { Proc.new { |q| post :create, question: attributes_for(q) } } | |
context 'with valid object' do | |
it 'saves the new question in the database' do | |
expect { create_request.call(:question) }.to change(Question, :count).by(1) | |
end | |
it 'redirects to show this question view' do | |
create_request.call(:question) |
NewerOlder