aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorJack Nagel2013-06-01 19:40:26 -0500
committerJack Nagel2013-06-01 19:40:26 -0500
commit4635363e2fad96967d5e3c40d38d3f154cf84093 (patch)
treeb4a100042c59d991b8e86e10d16c3cc094ce8986 /Library/Homebrew/test
parentb433d515866bbe5e7f868270b56ae2b31e9fa51d (diff)
downloadhomebrew-4635363e2fad96967d5e3c40d38d3f154cf84093.tar.bz2
test_mach: move helper method out of global namespace
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_mach.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/Library/Homebrew/test/test_mach.rb b/Library/Homebrew/test/test_mach.rb
index 6130c3796..309dcffe9 100644
--- a/Library/Homebrew/test/test_mach.rb
+++ b/Library/Homebrew/test/test_mach.rb
@@ -1,10 +1,14 @@
require 'testing_env'
-def file pn
- `/usr/bin/file -h '#{pn}'`.chomp
+module FileHelper
+ def file pn
+ `/usr/bin/file -h '#{pn}'`.chomp
+ end
end
class MachOPathnameTests < Test::Unit::TestCase
+ include FileHelper
+
def test_fat_dylib
pn = Pathname.new("#{TEST_FOLDER}/mach/fat.dylib")
assert pn.universal?
@@ -136,6 +140,8 @@ class MachOPathnameTests < Test::Unit::TestCase
end
class TextExecutableTests < Test::Unit::TestCase
+ include FileHelper
+
def teardown
(HOMEBREW_PREFIX/'foo_script').unlink
end