Permalink
Browse files

More quiet-related fixups.

  • Loading branch information...
1 parent 5ff9ca1 commit 6723ebfdacbe19db3b318e36157c4311fb183e16 @therealadam committed Nov 28, 2009
Showing with 5 additions and 8 deletions.
  1. +1 −4 lib/kicker/utils.rb
  2. +1 −1 test/options_test.rb
  3. +3 −3 test/utils_test.rb
View
5 lib/kicker/utils.rb
@@ -2,9 +2,6 @@ class Kicker
module Utils #:nodoc:
extend self
- attr_accessor :quiet
- self.quiet = false
-
attr_accessor :ruby_bin_path
self.ruby_bin_path = 'ruby'
@@ -22,7 +19,7 @@ def last_command
end
def log(message)
- if quiet
+ if Kicker.quiet
puts message
else
now = Time.now
View
2 test/options_test.rb
@@ -40,7 +40,7 @@
it 'should run in noisy mode by default' do
Kicker::Options.parse([])
- Kicker::Utils.should.not.be.quiet
+ Kicker.should.not.be.quiet
end
it 'should run in quiet mode if specified' do
View
6 test/utils_test.rb
@@ -21,14 +21,14 @@
end
it 'should print a log entry with no timestamp in quiet mode' do
- before = Kicker::Utils.quiet
+ before = Kicker.quiet
utils.expects(:puts).with('the message')
- Kicker::Utils.quiet = true
+ Kicker.quiet = true
utils.send(:log, 'the message')
- Kicker::Utils.quiet = before
+ Kicker.quiet = before
end
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.