Verify partial doubles

And look, we were stubbing deleted code.
This commit is contained in:
Maikel Linke
2024-05-02 17:00:48 +10:00
parent a65189c43e
commit 9c402fbdb2

View File

@@ -105,6 +105,15 @@ RSpec.configure do |config|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
# rspec-mocks config goes here. You can use an alternate test double
# library (such as bogus or mocha) by changing the `mock_with` option here.
config.mock_with :rspec do |mocks|
# Prevents you from mocking or stubbing a method that does not exist on
# a real object. This is generally recommended, and will default to
# `true` in RSpec 4.
mocks.verify_partial_doubles = true
end
# Reset locale for all specs.
config.around(:each) do |example|
I18n.with_locale(:en) { example.run }
@@ -191,11 +200,6 @@ RSpec.configure do |config|
end
end
# Geocoding
config.before(:each) {
allow_any_instance_of(Spree::Address).to receive(:geocode).and_return([1, 1])
}
default_country_id = DefaultCountry.id
checkout_zone = Spree::Config[:checkout_zone]
currency = Spree::Config[:currency]