aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/test
diff options
context:
space:
mode:
authorMarkus Reiter2017-01-22 23:17:09 +0100
committerAlyssa Ross2017-01-23 12:31:25 +0000
commitb7dc56a8aa08e5783072ac728ed08ca597262835 (patch)
tree07b0f05cb7db3786d9ce60709037f4ebeab322e9 /Library/Homebrew/cask/test
parent7d131de57dac25dbb7cf9a8f986c291de87f7e65 (diff)
downloadbrew-b7dc56a8aa08e5783072ac728ed08ca597262835.tar.bz2
Delete with_environment from cask tests.
Diffstat (limited to 'Library/Homebrew/cask/test')
-rw-r--r--Library/Homebrew/cask/test/cask/dsl_test.rb6
-rw-r--r--Library/Homebrew/cask/test/test_helper.rb2
2 files changed, 5 insertions, 3 deletions
diff --git a/Library/Homebrew/cask/test/cask/dsl_test.rb b/Library/Homebrew/cask/test/cask/dsl_test.rb
index 96d24a1a1..0ea928f40 100644
--- a/Library/Homebrew/cask/test/cask/dsl_test.rb
+++ b/Library/Homebrew/cask/test/cask/dsl_test.rb
@@ -69,7 +69,11 @@ describe Hbc::DSL do
end
it "may use deprecated DSL version hash syntax" do
- with_environment "HOMEBREW_DEVELOPER" => nil do
+ stub = proc do |arg|
+ arg == "HOMEBREW_DEVELOPER" ? nil : ENV[arg]
+ end
+
+ ENV.stub :[], stub do
shutup do
test_cask = Hbc.load("with-dsl-version")
test_cask.token.must_equal "with-dsl-version"
diff --git a/Library/Homebrew/cask/test/test_helper.rb b/Library/Homebrew/cask/test/test_helper.rb
index 275ede304..7315839f5 100644
--- a/Library/Homebrew/cask/test/test_helper.rb
+++ b/Library/Homebrew/cask/test/test_helper.rb
@@ -13,9 +13,7 @@ require "global"
# add Homebrew-Cask to load path
$LOAD_PATH.push(HOMEBREW_LIBRARY_PATH.join("cask", "lib").to_s)
-require "test/support/helper/env"
require "test/support/helper/shutup"
-include Test::Helper::Env
include Test::Helper::Shutup
def sudo(*args)