diff options
| author | mansimarkaur | 2017-08-24 01:44:48 +0530 |
|---|---|---|
| committer | mansimarkaur | 2017-08-29 16:24:19 +0530 |
| commit | db28126b4a31c3d8ff910283fc50ab4de1f63db2 (patch) | |
| tree | 7d01a561f466f6c58bb2044ac0652ac0e962963c | |
| parent | 413d35b82fc66a6970d933a845a242b795340e44 (diff) | |
| download | brew-db28126b4a31c3d8ff910283fc50ab4de1f63db2.tar.bz2 | |
Used clear_anonymous_os_prefix_ci_cache to remove @anonymous_os_prefix_ci
| -rw-r--r-- | Library/Homebrew/test/utils/analytics_spec.rb | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/Library/Homebrew/test/utils/analytics_spec.rb b/Library/Homebrew/test/utils/analytics_spec.rb index 228c352b4..bb6cda0b1 100644 --- a/Library/Homebrew/test/utils/analytics_spec.rb +++ b/Library/Homebrew/test/utils/analytics_spec.rb @@ -5,9 +5,7 @@ describe Utils::Analytics do describe "::os_prefix_ci" do context "when anonymous_os_prefix_ci is not set" do before(:each) do - if described_class.instance_variable_defined?(:@anonymous_os_prefix_ci) - described_class.send(:remove_instance_variable, :@anonymous_os_prefix_ci) - end + described_class.clear_anonymous_os_prefix_ci_cache end it "returns OS_VERSION and prefix when HOMEBREW_PREFIX is not /usr/local" do @@ -20,7 +18,7 @@ describe Utils::Analytics do expect(described_class.os_prefix_ci).to include("CI") end - it "does not include prefix when HOMEBREW_PREFIX is usr/local" do + it "does not include prefix when HOMEBREW_PREFIX is /usr/local" do stub_const("HOMEBREW_PREFIX", "/usr/local") expect(described_class.os_prefix_ci).not_to include("non-/usr/local") end @@ -50,17 +48,6 @@ describe Utils::Analytics do expect(described_class.report_event("install", action)).to be_nil end end - - context "when ENV vars are nil" do - before do - 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 - expect(described_class.report_event("install", action)).to be_an_instance_of(Thread) - end - end end describe "::report_build_error" do |
