Sha256: e4982549c398d844f721688d604b3a9ce94f46606e51e75bf1b98fa42085930a
Contents?: true
Size: 967 Bytes
Versions: 34
Compression:
Stored size: 967 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' RSpec.describe Spree::TestingSupport::Preferences do describe 'resetting the app configuration' do before do @original_spree_mails_from = Spree::Config.mails_from @original_spree_searcher_class = Spree::Config.searcher_class class MySearcherClass; end include Spree::TestingSupport::Preferences Spree::Config.mails_from = "hello@myserver.com" Spree::Config.searcher_class = MySearcherClass end it 'resets normal preferences' do expect(Spree::Config.mails_from).to eq("hello@myserver.com") reset_spree_preferences expect(Spree::Config.mails_from).to eq(@original_spree_mails_from) end it 'resets cached configuration instance variables' do expect(Spree::Config.searcher_class).to eq(MySearcherClass) reset_spree_preferences expect(Spree::Config.searcher_class).to eq(@original_spree_searcher_class) end end end
Version data entries
34 entries across 34 versions & 2 rubygems