Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

More quiet-related fixups.

  • Loading branch information...
commit 6723ebfdacbe19db3b318e36157c4311fb183e16 1 parent 5ff9ca1
Adam Keys authored
5 lib/kicker/utils.rb
@@ -2,9 +2,6 @@ class Kicker
2 2 module Utils #:nodoc:
3 3 extend self
4 4
5   - attr_accessor :quiet
6   - self.quiet = false
7   -
8 5 attr_accessor :ruby_bin_path
9 6 self.ruby_bin_path = 'ruby'
10 7
@@ -22,7 +19,7 @@ def last_command
22 19 end
23 20
24 21 def log(message)
25   - if quiet
  22 + if Kicker.quiet
26 23 puts message
27 24 else
28 25 now = Time.now
2  test/options_test.rb
@@ -40,7 +40,7 @@
40 40
41 41 it 'should run in noisy mode by default' do
42 42 Kicker::Options.parse([])
43   - Kicker::Utils.should.not.be.quiet
  43 + Kicker.should.not.be.quiet
44 44 end
45 45
46 46 it 'should run in quiet mode if specified' do
6 test/utils_test.rb
@@ -21,14 +21,14 @@
21 21 end
22 22
23 23 it 'should print a log entry with no timestamp in quiet mode' do
24   - before = Kicker::Utils.quiet
  24 + before = Kicker.quiet
25 25
26 26 utils.expects(:puts).with('the message')
27 27
28   - Kicker::Utils.quiet = true
  28 + Kicker.quiet = true
29 29 utils.send(:log, 'the message')
30 30
31   - Kicker::Utils.quiet = before
  31 + Kicker.quiet = before
32 32 end
33 33
34 34 it "should log the output of the command indented by 2 spaces and whether or not the command succeeded" do

0 comments on commit 6723ebf

Please sign in to comment.
Something went wrong with that request. Please try again.