spec/nyanko/logger_spec.rb in nyanko-0.0.8 vs spec/nyanko/logger_spec.rb in nyanko-0.0.9
- old
+ new
@@ -78,7 +78,17 @@
it "logs nothing" do
described_class.debug("test")
log.should == ""
end
end
+
+ context "when Rails.logger is nil" do
+ before do
+ Rails.stub(:logger)
+ end
+
+ it "does notihng" do
+ expect { described_class.debug(exception) }.not_to raise_error(NoMethodError)
+ end
+ end
end
end