spec/loggability_spec.rb in loggability-0.10.0 vs spec/loggability_spec.rb in loggability-0.10.1
- old
+ new
@@ -128,9 +128,14 @@
subclass = Class.new( @class )
expect( subclass.log.logger ).to be( @loghost.logger )
expect( Loggability[subclass] ).to be( @loghost.logger )
end
+ it "raises an exception if asked for a log host that hasn't yet been declared" do
+ logged_class = Class.new { extend Loggability; log_to :the_void }
+ expect { logged_class.log.logger }.to raise_error( ArgumentError, /no log host/i )
+ end
+
end
context "aggregate methods" do