aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-06-10 20:40:51 -0500
committerJack Nagel2014-06-10 20:40:51 -0500
commite3472540c1789cb30d529c9647213f71f96f1879 (patch)
tree18ea27b58f06ee44dfaabd3cba5cb3d0287ed319 /Library
parentc7685d2b70d4e6fc7ac5bbc77791687d4d0d4d98 (diff)
downloadbrew-e3472540c1789cb30d529c9647213f71f96f1879.tar.bz2
Pull common code into setup method
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/test_mach.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/Library/Homebrew/test/test_mach.rb b/Library/Homebrew/test/test_mach.rb
index f472cced9..5be10bb7c 100644
--- a/Library/Homebrew/test/test_mach.rb
+++ b/Library/Homebrew/test/test_mach.rb
@@ -171,12 +171,17 @@ end
class TextExecutableTests < Test::Unit::TestCase
include FileHelper
+ attr_reader :pn
+
+ def setup
+ @pn = HOMEBREW_PREFIX.join("an_executable")
+ end
+
def teardown
- (HOMEBREW_PREFIX/'foo_script').unlink
+ HOMEBREW_PREFIX.join("an_executable").unlink
end
def test_simple_shebang
- pn = HOMEBREW_PREFIX/'foo_script'
pn.write '#!/bin/sh'
assert !pn.universal?
assert !pn.i386?
@@ -192,7 +197,6 @@ class TextExecutableTests < Test::Unit::TestCase
end
def test_shebang_with_options
- pn = HOMEBREW_PREFIX/'foo_script'
pn.write '#! /usr/bin/perl -w'
assert !pn.universal?
assert !pn.i386?
@@ -208,7 +212,6 @@ class TextExecutableTests < Test::Unit::TestCase
end
def test_malformed_shebang
- pn = HOMEBREW_PREFIX/'foo_script'
pn.write ' #!'
assert !pn.universal?
assert !pn.i386?