everydayrails / everydayrails-rspec-2017

Sample source for the 2017 edition of Everyday Rails Testing with RSpec.
http://rspectutorial.com
312 stars 247 forks source link

Chapter 8, 10 and 11, `login_as` method is still used #81

Closed JunichiIto closed 6 years ago

JunichiIto commented 6 years ago

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:

https://github.com/everydayrails/everydayrails-rspec-2017/commit/4c322c660f2756a3dbb6b93adbccdba8da41bc9b

Could you review the book text and the sample codes?

ruralocity commented 6 years ago

Released.