Почему мой RSpec не загружает Devise :: Test :: ControllerHelpers?

Я использую Rails 5 и Devise 3.5.1.

Пройдя хорошую (более старую) книгу о создании / тестировании API, в котором используется аутентификация Devise. Он был написан до Rails 5, поэтому я решил не использовать новую версию только для API.

Вот мой тест ...

#/spec/controllers/api/v1/users_controller_spec.rb    

require 'rails_helper'

describe Api::V1::UsersController, :type => :controller do
    before(:each) { request.headers['Accept'] = "application/vnd.marketplace.v1" }
    describe "GET #show" do
        before(:each) do
            @user = FactoryGirl.create :user
            get :show, params: {id: @user.id}, format: :json
        end
        it "returns the information about a reporter on a hash" do
            user_response = JSON.parse(response.body, symbolize_names: true)
            expect(user_response[:email]).to eql @user.email
        end
        it { should respond_with 200 }
    end
end

И вот совершенно неожиданная ошибка RSpec

Devise::MissingWarden:
       Devise could not find the `Warden::Proxy` instance on your request environment.
       Make sure that your application is loading Devise and Warden as expected and that the `Warden::Manager` middleware is present in your middleware stack.
       If you are seeing this on one of your tests, ensure that your tests are either executing the Rails middleware stack or that your tests are using the `Devise::Test::ControllerHelpers` module to inject the `request.env['warden']` object for you.

Итак, я иду сюда -http://www.rubydoc.info/gems/devise/Devise/Test/ControllerHelpers

и попробовал это ->include Devise :: Test :: ControllerHelpers

который не помог, потому что файлcontroller_helpers.rb нигде в моем проекте

Что я здесь пропустил?

Спасибо

Ответы на вопрос(3)

Ваш ответ на вопрос