diff options
| author | mansimarkaur | 2017-08-20 22:04:09 +0530 |
|---|---|---|
| committer | mansimarkaur | 2017-08-29 16:24:19 +0530 |
| commit | 59f3c661a31d2d0d7f649fbe75daae171b2cfd23 (patch) | |
| tree | af2c2fd81a80955aac2e115c35a4e17409fe04e1 /Library/Homebrew/test | |
| parent | a4d8d7ba576e1418a18eb605b8eddc6c10447608 (diff) | |
| download | brew-59f3c661a31d2d0d7f649fbe75daae171b2cfd23.tar.bz2 | |
Used ENV.delete to remove set ENV vars
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/utils/analytics_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/test/utils/analytics_spec.rb b/Library/Homebrew/test/utils/analytics_spec.rb index eb675b370..228c352b4 100644 --- a/Library/Homebrew/test/utils/analytics_spec.rb +++ b/Library/Homebrew/test/utils/analytics_spec.rb @@ -44,8 +44,8 @@ describe Utils::Analytics do end it "returns nil when HOMEBREW_ANALYTICS_DEBUG is true" do - ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = nil - ENV["HOMEBREW_NO_ANALYTICS"] = nil + ENV.delete("HOMEBREW_NO_ANALYTICS_THIS_RUN") + ENV.delete("HOMEBREW_NO_ANALYTICS") ENV["HOMEBREW_ANALYTICS_DEBUG"] = "true" expect(described_class.report_event("install", action)).to be_nil end @@ -53,8 +53,8 @@ describe Utils::Analytics do context "when ENV vars are nil" do before do - ENV["HOMEBREW_NO_ANALYTICS"] = nil - ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = nil + ENV.delete("HOMEBREW_NO_ANALYTICS_THIS_RUN") + ENV.delete("HOMEBREW_NO_ANALYTICS") end it "returns waiting thread when HOMEBREW_ANALYTICS_DEBUG is not set" do |
