Commit db843b9

mo khan <mo@mokhan.ca>
2013-12-27 17:19:20
undefine logger after each spec.
1 parent 5acc566
Changed files (2)
lib
nasty
spec
lib/nasty/log.rb
@@ -13,6 +13,10 @@ module Nasty
         end
         @@log_factory.create_for(target)
       end
+
+      def unbind
+        remove_class_variable(:@@log_factory)
+      end
     end
   end
 
spec/unit/log_spec.rb
@@ -24,6 +24,10 @@ module Nasty
         Log.for(self).debug("hi there")
       end
 
+      after :each do
+        Log.unbind
+      end
+
       it "should log to the bound logger" do
         logger.should have_received(:debug).with("hi there")
       end