diff options
| author | Jack Nagel | 2014-06-10 21:45:10 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-06-10 21:46:29 -0500 |
| commit | bb29d1630b434533280f9aef6b274fccd8b7791e (patch) | |
| tree | 31806d10023f6038706e6650c2bf5bc14c4f87f6 /Library | |
| parent | 47a2eb4f53d415ac2e2d99448f860e7be46e23ce (diff) | |
| download | homebrew-bb29d1630b434533280f9aef6b274fccd8b7791e.tar.bz2 | |
Remove ABS__FILE constant from test environment
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/test/test_updater.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/test/testing_env.rb | 3 |
2 files changed, 2 insertions, 7 deletions
diff --git a/Library/Homebrew/test/test_updater.rb b/Library/Homebrew/test/test_updater.rb index 0d3cbc7fa..85bfd61b4 100644 --- a/Library/Homebrew/test/test_updater.rb +++ b/Library/Homebrew/test/test_updater.rb @@ -38,11 +38,7 @@ class UpdaterTests < Test::Unit::TestCase end def self.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') + @fixture_data ||= YAML.load_file("#{TEST_FOLDER}/fixtures/updater_fixture.yaml") end def setup diff --git a/Library/Homebrew/test/testing_env.rb b/Library/Homebrew/test/testing_env.rb index f0bd1726d..6b6f7ba3d 100644 --- a/Library/Homebrew/test/testing_env.rb +++ b/Library/Homebrew/test/testing_env.rb @@ -1,6 +1,5 @@ # Require this file to build a testing environment. -ABS__FILE__ = File.expand_path(__FILE__) $:.push(File.expand_path(__FILE__+'/../..')) require 'extend/module' @@ -55,7 +54,7 @@ end at_exit { HOMEBREW_PREFIX.parent.rmtree } # Test fixtures and files can be found relative to this path -TEST_FOLDER = Pathname.new(ABS__FILE__).parent.realpath +TEST_FOLDER = File.dirname(File.expand_path(__FILE__)) def shutup if ARGV.verbose? |
