diff --git a/lib/ab_panel.rb b/lib/ab_panel.rb index 697ef18..ec25e33 100644 --- a/lib/ab_panel.rb +++ b/lib/ab_panel.rb @@ -63,11 +63,11 @@ def set_env(key, value) end def funnels - env['funnels'] ||= Set.new + env[:funnels] ||= Set.new end def funnels=(funnels) - Thread.current['ab_panel_env']['funnels'] = funnels + env[:funnels] = funnels end def add_funnel(funnel) diff --git a/spec/ab_panel_spec.rb b/spec/ab_panel_spec.rb index 5893abd..3d473fb 100644 --- a/spec/ab_panel_spec.rb +++ b/spec/ab_panel_spec.rb @@ -62,6 +62,10 @@ end describe ".funnels" do + before do + AbPanel.reset! + end + after do AbPanel.funnels = nil end