require 'spree/testing_support/factories' require 'spree/testing_support/url_helpers' require 'spree/testing_support/controller_requests' require 'spree/testing_support/authorization_helpers' require 'spree/testing_support/capybara_ext' # Monkey patch for pending: https://github.com/spree/spree/pull/5182 module Spree module TestingSupport module AuthorizationHelpers module Controller def stub_authorization!(&block) ability_class = build_ability(&block) before do allow(controller).to receive(:current_ability).and_return(ability_class.new(nil)) end end end end end end RSpec.configure do |config| config.include Spree::TestingSupport::UrlHelpers config.include Spree::TestingSupport::ControllerRequests, type: :controller end