aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_updater.rb
diff options
context:
space:
mode:
authorJack Nagel2014-07-26 20:11:53 -0500
committerJack Nagel2014-07-26 20:11:53 -0500
commit8a0fd581463d8261e51f8b9175dbb537d3ad2dc4 (patch)
treec8f3d41a7b92963a0de108bc9280b3154239d80f /Library/Homebrew/test/test_updater.rb
parent6d628e03e448a469a257d581cb31cae8bf00c31d (diff)
downloadhomebrew-8a0fd581463d8261e51f8b9175dbb537d3ad2dc4.tar.bz2
Separate reading and parsing the diff
Diffstat (limited to 'Library/Homebrew/test/test_updater.rb')
-rw-r--r--Library/Homebrew/test/test_updater.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/test/test_updater.rb b/Library/Homebrew/test/test_updater.rb
index 28ce48ad0..0806b3d7c 100644
--- a/Library/Homebrew/test/test_updater.rb
+++ b/Library/Homebrew/test/test_updater.rb
@@ -4,6 +4,8 @@ require 'yaml'
class UpdaterTests < Homebrew::TestCase
class UpdaterMock < ::Updater
+ attr_accessor :diff
+
def initialize(*)
super
@outputs = Hash.new { |h, k| h[k] = [] }
@@ -51,12 +53,12 @@ class UpdaterTests < Homebrew::TestCase
def perform_update(diff_output="")
HOMEBREW_REPOSITORY.cd do
+ @updater.diff = diff_output
@updater.in_repo_expect("git checkout -q master")
@updater.in_repo_expect("git rev-parse -q --verify HEAD", "1234abcd")
@updater.in_repo_expect("git config core.autocrlf false")
@updater.in_repo_expect("git pull -q origin refs/heads/master:refs/remotes/origin/master")
@updater.in_repo_expect("git rev-parse -q --verify HEAD", "3456cdef")
- @updater.in_repo_expect("git diff-tree -r --name-status --diff-filter=AMD 1234abcd 3456cdef", diff_output)
@updater.pull!
@report.update(@updater.report)
end