Skip to content

Commit

Permalink
Use logger for all output
Browse files Browse the repository at this point in the history
  • Loading branch information
jsl committed May 16, 2011
1 parent aa68c1a commit cf761d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/propel/git_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def git git_args
Result.new(output, exitcode)

else
puts output
logger.puts output
exit exitcode
end
end
Expand Down
3 changes: 2 additions & 1 deletion spec/propel/git_repository_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
describe "when the process exits with a non-zero exit status" do
it "should print the process stdout to the console and exit with the exit code of the process" do
git_repository = Propel::GitRepository.new
git_repository.logger = stub_logger

git_repository.should_receive(:run_command).with('pull --rebase').and_return([ 'my message', 127 ])
git_repository.should_receive(:exit).with(127)
git_repository.should_receive(:puts).with('my message')
git_repository.logger.should_receive(:puts).with('my message')
git_repository.pull(true)
end
end
Expand Down

0 comments on commit cf761d8

Please sign in to comment.