spec/support/app_integration.rb in hanami-2.1.0 vs spec/support/app_integration.rb in hanami-2.2.0.beta1
- old
+ new
@@ -116,9 +116,12 @@
autoloaders_teardown!
Hanami.instance_variable_set(:@_bundled, {})
Hanami.remove_instance_variable(:@_app) if Hanami.instance_variable_defined?(:@_app)
+ # Clear cached DB gateways across slices
+ Hanami::Providers::DB.cache.clear
+
$LOAD_PATH.replace(@load_paths)
# Remove example-specific LOADED_FEATURES added when running each example
new_features_to_keep = ($LOADED_FEATURES - @loaded_features).tap { |feats|
feats.delete_if do |path|