Last active
August 20, 2017 06:10
-
-
Save kazumalab/f36a90ad441fecce486bc5a8b93ac763 to your computer and use it in GitHub Desktop.
ApplicationController.current_userをモックしてない場合(テストは失敗)
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
require 'rails_helper' | |
RSpec.describe "UserController", type: :request do | |
describe "#index" do | |
let(:user) { FactoryGirl.create(:user) } | |
context 'success' do | |
before do | |
get user_path user | |
end | |
it { expect(response).to render_template :show } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment