Avoid global state change by using config stub

This commit is contained in:
Maikel Linke
2019-03-19 11:32:18 +11:00
parent 1ea2f37c18
commit 3ef6878233

View File

@@ -1,10 +1,6 @@
shared_examples "a model using the LocalizedNumber module" do |attributes|
before do
Spree::Config[:enable_localized_number?] = true
end
after do
Spree::Config[:enable_localized_number?] = false
allow(Spree::Config).to receive(:enable_localized_number?).and_return true
end
attributes.each do |attribute|