diff --git a/test/integration_test.rb b/test/integration_test.rb index f2a44d9..1bcba44 100644 --- a/test/integration_test.rb +++ b/test/integration_test.rb @@ -9,7 +9,12 @@ after do # Reset Circuitbox - Circuitbox.configure { |config| config.default_circuit_store = Circuitbox::MemoryStore.new } + if Circuitbox.method_defined?(:reset) + Circuitbox.reset + else + Circuitbox.configure { |config| config.default_circuit_store = Circuitbox::MemoryStore.new } + end + VertexClient.reconfigure! end diff --git a/test/vertex_client_test.rb b/test/vertex_client_test.rb index da44952..4228214 100644 --- a/test/vertex_client_test.rb +++ b/test/vertex_client_test.rb @@ -44,16 +44,20 @@ describe 'circuit' do before do - Circuitbox.configure do |config| - config.default_circuit_store = Circuitbox::MemoryStore.new + if Circuitbox.method_defined?(:reset) + Circuitbox.reset + else + Circuitbox.configure { |config| config.default_circuit_store = Circuitbox::MemoryStore.new } end VertexClient.reconfigure! end after do - Circuitbox.configure do |config| - config.default_circuit_store = Circuitbox::MemoryStore.new + if Circuitbox.method_defined?(:reset) + Circuitbox.reset + else + Circuitbox.configure { |config| config.default_circuit_store = Circuitbox::MemoryStore.new } end VertexClient.reconfigure!