Permalink
Browse files

Use proper logger form configuration

  • Loading branch information...
1 parent e82de1c commit ffe860fd44b30ed4276546ed847f23eaad9014b9 @MasterLambaster committed Jun 6, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −1 lib/capistrano/recipes/deploy/strategy/base.rb
  2. +2 −1 test/deploy/strategy/copy_test.rb
@@ -73,7 +73,7 @@ def system(*args)
private
def logger
- @logger ||= configuration[:logger] || Capistrano::Logger.new(:output => STDOUT)
+ @logger ||= configuration.logger || Capistrano::Logger.new(:output => STDOUT)
end
# The revision to deploy. Must return a real revision identifier,
@@ -6,10 +6,11 @@
class DeployStrategyCopyTest < Test::Unit::TestCase
def setup
@config = { :application => "captest",
- :logger => Capistrano::Logger.new(:output => StringIO.new),
:releases_path => "/u/apps/test/releases",
:release_path => "/u/apps/test/releases/1234567890",
:real_revision => "154" }
+ @config.stubs(:logger).returns(stub_everything)
+
@source = mock("source")
@config.stubs(:source).returns(@source)
@strategy = Capistrano::Deploy::Strategy::Copy.new(@config)

0 comments on commit ffe860f

Please sign in to comment.