Sha256: 334b01841a209bb1dbe592204761bbb9f1f9ca68914758f389b17222c4361651
Contents?: true
Size: 658 Bytes
Versions: 1
Compression:
Stored size: 658 Bytes
Contents
require 'spec_helper' describe GmailCli::Logger do let(:logger) { GmailCli::Logger } let(:trace_something) { logger.trace 'somthing', 'bogative' } it "does not log when verbose mode not enabled" do expect($stderr).to receive(:puts).never trace_something end it "logs when verbose mode enabled" do logger.set_log_mode(true) expect($stderr).to receive(:puts).and_return(nil) trace_something logger.set_log_mode(false) end it "does not log when verbose mode enabled then disabled" do logger.set_log_mode(true) logger.set_log_mode(false) expect($stderr).to receive(:puts).never trace_something end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gmail_cli-0.1.0 | spec/unit/logger_spec.rb |