Chapter 8, 10 and 11, `login_as` method is still used
JunichiIto opened this issue · 1 comments
JunichiIto commented
In page 123, you wrote "Now, replace the call to our custom sign_in_as method with a call to the Devise helper, sign_in:", but login_as
is still used in the next page:
require 'rails_helper'
RSpec.feature "Projects", type: :feature do
scenario "user creates a new project" do
user = FactoryBot.create(:user)
login_as user, scope: :user
# rest of scenario ...
In other pages in the chapter 8, 10 and 11, login_as
is still used in the sample codes of feature specs.
In addition, the codes in this repository are using login_as
method too:
https://github.com/everydayrails/everydayrails-rspec-2017/search?q=login_as&unscoped_q=login_as
Some codes are using sign_in
but I think scope
option is not required:
Could you review the book text and the sample codes?
ruralocity commented
Released.