aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorJack Nagel2013-03-28 17:37:29 -0500
committerJack Nagel2013-03-28 17:37:29 -0500
commitfe3eb727335ab214754a6216e6b219760e8ee9d3 (patch)
tree810b1263ea312f80ceb364069cb6bd16e4fbbffb /Library/Homebrew/test
parent6078e757bb2b473bb8cc25cb5eaf53325e7db1d2 (diff)
downloadhomebrew-fe3eb727335ab214754a6216e6b219760e8ee9d3.tar.bz2
Suppress uninitialized instance variable warnings
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_updater.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/Library/Homebrew/test/test_updater.rb b/Library/Homebrew/test/test_updater.rb
index 4f7a6378e..297349450 100644
--- a/Library/Homebrew/test/test_updater.rb
+++ b/Library/Homebrew/test/test_updater.rb
@@ -3,6 +3,7 @@ abort if ARGV.include? "--skip-update"
require 'testing_env'
require 'formula'
require 'cmd/update'
+require 'yaml'
class UpdaterMock < Updater
def in_repo_expect(cmd, output = '')
@@ -36,11 +37,11 @@ class UpdaterTests < Test::Unit::TestCase
end
def self.fixture_data
- unless @fixture_data
- require 'yaml'
- @fixture_data = YAML.load_file(Pathname.new(ABS__FILE__).parent.realpath + 'fixtures/updater_fixture.yaml')
- end
- @fixture_data
+ @fixture_data ||= load_fixture_data
+ end
+
+ def self.load_fixture_data
+ YAML.load_file(Pathname.new(ABS__FILE__).parent.realpath + 'fixtures/updater_fixture.yaml')
end
def test_update_homebrew_without_any_changes