Sha256: 16c00bd3cd3ef5cfe942bfbc15043e027f25ada3ade56381f3f20a8cd4d238e6

Contents?: true

Size: 422 Bytes

Versions: 7

Compression:

Stored size: 422 Bytes

Contents

require 'qcmd'

describe Qcmd do
  # tests go here
  it "should log debug messages when in verbose mode" do
    Qcmd.should_receive(:log, 'hello')

    Qcmd.verbose!
    Qcmd.log_level.should eql(:debug)
    Qcmd.debug 'hello'
  end

  it 'should not log debug messages when not in verbose mode' do
    Qcmd.should_not_receive(:log)
    Qcmd.quiet!
    Qcmd.log_level.should eql(:warning)
    Qcmd.debug 'hello'
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
qcmd-0.1.6 spec/qcmd_spec.rb
qcmd-0.1.5 spec/qcmd_spec.rb
qcmd-0.1.4 spec/qcmd_spec.rb
qcmd-0.1.3 spec/qcmd_spec.rb
qcmd-0.1.2 spec/qcmd_spec.rb
qcmd-0.1.1 spec/qcmd_spec.rb
qcmd-0.1.0 spec/qcmd_spec.rb