Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
thewoolleyman committed Nov 28, 2008
1 parent e7fa1ec commit 0a4694b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/source_control/abstract_adapter.rb
Expand Up @@ -69,6 +69,7 @@ def execute_with_error_log(command, error_log)
ensure
FileUtils.rm_f(error_log)
end
raise BuilderError.new(error_message, "source_control_error") unless error_message.empty?
return stdout_output
end
end
Expand Down
16 changes: 16 additions & 0 deletions test/unit/source_control/abstract_adapter_test.rb
@@ -0,0 +1,16 @@
require File.dirname(__FILE__) + '/../../test_helper'
require 'stringio'

class SourceControl::AbstractAdapterTest < Test::Unit::TestCase

include FileSandbox

def test_execute_with_error_log__handles_exceptions
@adapter = SourceControl::AbstractAdapter.new
in_total_sandbox do
assert_raise(BuilderError) do
@adapter.execute_with_error_log("xaswedf", @stderr)
end
end
end
end

0 comments on commit 0a4694b

Please sign in to comment.