From fef8f143e8a97141b747e9288100d4e8dbd3fc19 Mon Sep 17 00:00:00 2001 From: Josh Hagins Date: Wed, 19 Oct 2016 12:35:12 -0400 Subject: [PATCH] compliance_test: unset HOMEBREW_DEVELOPER to avoid deprecation errors --- .../Homebrew/cask/test/Casks/compliance_test.rb | 16 +++++++++------- Library/Homebrew/cask/test/test_helper.rb | 2 ++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Library/Homebrew/cask/test/Casks/compliance_test.rb b/Library/Homebrew/cask/test/Casks/compliance_test.rb index fff3e07985..1ab5819ed0 100644 --- a/Library/Homebrew/cask/test/Casks/compliance_test.rb +++ b/Library/Homebrew/cask/test/Casks/compliance_test.rb @@ -1,13 +1,15 @@ require 'test_helper' describe "Casks" do - Hbc.all.reject {|c| c.is_a?(Hbc::TestCask) }.each do |cask| - describe "#{cask}" do - it "passes audit" do - audit = Hbc::Audit.new(cask) - audit.run! - audit.errors.must_equal [], "[#{cask}] Cask audit must be error free" - audit.warnings.must_equal [], "[#{cask}] Cask audit must be warning free" + with_environment "HOMEBREW_DEVELOPER" => nil do + Hbc.all.reject {|c| c.is_a?(Hbc::TestCask) }.each do |cask| + describe "#{cask}" do + it "passes audit" do + audit = Hbc::Audit.new(cask) + audit.run! + audit.errors.must_equal [], "[#{cask}] Cask audit must be error free" + audit.warnings.must_equal [], "[#{cask}] Cask audit must be warning free" + end end end end diff --git a/Library/Homebrew/cask/test/test_helper.rb b/Library/Homebrew/cask/test/test_helper.rb index 25b32d2de0..8f5e25777a 100644 --- a/Library/Homebrew/cask/test/test_helper.rb +++ b/Library/Homebrew/cask/test/test_helper.rb @@ -17,7 +17,9 @@ require "global" # add Homebrew-Cask to load path $LOAD_PATH.push(project_root.join("lib").to_s) +require "test/helper/env" require "test/helper/shutup" +include Test::Helper::Env include Test::Helper::Shutup def sudo(*args)