From 3dbcba0c03225f2069e8d0681fbdecba9469d345 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 23 Jun 2014 18:50:55 -0500 Subject: Call original backtick using super --- Library/Homebrew/test/test_updater.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Library/Homebrew/test') diff --git a/Library/Homebrew/test/test_updater.rb b/Library/Homebrew/test/test_updater.rb index 81e60822a..410e54423 100644 --- a/Library/Homebrew/test/test_updater.rb +++ b/Library/Homebrew/test/test_updater.rb @@ -16,8 +16,8 @@ class UpdaterTests < Homebrew::TestCase @outputs[cmd] << output end - def `(cmd, *args) - cmd = "#{cmd} #{args*' '}".strip + def `(*args) + cmd = args.join(" ") if @expected.include?(cmd) and !@outputs[cmd].empty? @called << cmd @outputs[cmd].shift @@ -25,8 +25,7 @@ class UpdaterTests < Homebrew::TestCase raise "#{inspect} unexpectedly called backticks: `#{cmd}`" end end - - alias safe_system ` #` + alias_method :safe_system, :` def expectations_met? @expected == @called -- cgit v1.2.3