remove global state leaks from specs

approved
#1

remove global state leaks from specs

diff --git a/test/metric/counter_test.rb b/test/metric/counter_test.rb
index 6fbac2b..9dd574a 100644
--- a/test/metric/counter_test.rb
+++ b/test/metric/counter_test.rb
@@ -22,6 +22,7 @@ module PrometheusExporter::Metric
       TEXT
 
       assert_equal(counter.to_prometheus_text, text)
+      Base.default_prefix = ''
     end
 
     it "can correctly increment counters with labels" do
diff --git a/test/metric/gauge_test.rb b/test/metric/gauge_test.rb
index b56c797..2fa35e3 100644
--- a/test/metric/gauge_test.rb
+++ b/test/metric/gauge_test.rb
@@ -45,6 +45,8 @@ module PrometheusExporter::Metric
       TEXT
 
       assert_equal(gauge.to_prometheus_text, text)
+
+      Base.default_prefix = ''
     end
 
     it "can correctly set gauges with labels" do
diff --git a/test/server/unicorn_collector_test.rb b/test/server/unicorn_collector_test.rb
index 23e7d12..409fcc0 100644
--- a/test/server/unicorn_collector_test.rb
+++ b/test/server/unicorn_collector_test.rb
@@ -4,6 +4,11 @@ require 'prometheus_exporter/server'
 require 'prometheus_exporter/instrumentation'
 
 class PrometheusUnicornCollectorTest < Minitest::Test
+
+  def setup
+    PrometheusExporter::Metric::Base.default_prefix = ''
+  end
+
   def collector
     @collector ||= PrometheusExporter::Server::UnicornCollector.new
   end

GitHub sha: eaeead08

#2

:heart:

Approved #3