small medium large xlarge

Back to: All Forums  Take My Money
168773_487844284333_6098179_n_pragsmall
18 Oct 2016, 01:07
Gui Albuk (1 post)

Since Devise 4, the minimum required for Rails 5, there is a simpler way to configure Devise with RSpec.

So in Chapter 1, page 8, instead of:

RSpec.configure do |config|
  config.include Warden::Test::Helpers

  config.before :suite do
      Warden.test_mode!
  end

  config.after :each do
    Warden.test_reset!
  end
end

we could use:

RSpec.configure do |config|
   config.include Devise::Test::IntegrationHelpers, type: :feature
end

and we will get the same result.

source code: https://github.com/plataformatec/devise/blob/master/lib/devise/test/integration_helpers.rb

I hope this can help.

I’m loving the book! It’s helping me a lot.

Gui Albuk

Head_shot_pragsmall
18 Oct 2016, 11:43
Noel Rappin (49 posts)

Thanks! That’s very helpful. I’m glad you are enjoying the book.

Noel

You must be logged in to comment