aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cleanup_spec.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-07-29 19:55:05 +0200
committerMarkus Reiter2017-07-29 20:25:37 +0200
commit2ad3a87045246f89aa267251315d660f663c42f2 (patch)
treedfb44525f5ae6233816ec97a4c868ea522b2358c /Library/Homebrew/test/cleanup_spec.rb
parente48a6736b8db7967b1f849975432ddbca6e8f9c0 (diff)
downloadbrew-2ad3a87045246f89aa267251315d660f663c42f2.tar.bz2
Silence all specs by default.
Diffstat (limited to 'Library/Homebrew/test/cleanup_spec.rb')
-rw-r--r--Library/Homebrew/test/cleanup_spec.rb56
1 files changed, 19 insertions, 37 deletions
diff --git a/Library/Homebrew/test/cleanup_spec.rb b/Library/Homebrew/test/cleanup_spec.rb
index 2c3eddb8c..4e5e42efa 100644
--- a/Library/Homebrew/test/cleanup_spec.rb
+++ b/Library/Homebrew/test/cleanup_spec.rb
@@ -18,9 +18,7 @@ describe Homebrew::Cleanup do
describe "::cleanup" do
it "removes .DS_Store files" do
- shutup do
- described_class.cleanup
- end
+ described_class.cleanup
expect(ds_store).not_to exist
end
@@ -28,9 +26,7 @@ describe Homebrew::Cleanup do
it "doesn't remove anything if `--dry-run` is specified" do
ARGV << "--dry-run"
- shutup do
- described_class.cleanup
- end
+ described_class.cleanup
expect(ds_store).to exist
end
@@ -42,14 +38,12 @@ describe Homebrew::Cleanup do
before(:each) do
described_class.instance_variable_set(:@unremovable_kegs, [])
- shutup do
- [f1, f2].each do |f|
- f.brew do
- f.install
- end
-
- Tab.create(f, DevelopmentTools.default_compiler, :libcxx).write
+ [f1, f2].each do |f|
+ f.brew do
+ f.install
end
+
+ Tab.create(f, DevelopmentTools.default_compiler, :libcxx).write
end
allow_any_instance_of(Keg)
@@ -58,12 +52,12 @@ describe Homebrew::Cleanup do
end
it "doesn't remove any kegs" do
- shutup { described_class.cleanup_formula f2 }
+ described_class.cleanup_formula f2
expect(f1.installed_kegs.size).to eq(2)
end
it "lists the unremovable kegs" do
- shutup { described_class.cleanup_formula f2 }
+ described_class.cleanup_formula f2
expect(described_class.unremovable_kegs).to contain_exactly(f1.installed_kegs[0])
end
end
@@ -89,14 +83,12 @@ describe Homebrew::Cleanup do
version_scheme 2
end.new
- shutup do
- [f1, f2, f3, f4].each do |f|
- f.brew do
- f.install
- end
-
- Tab.create(f, DevelopmentTools.default_compiler, :libcxx).write
+ [f1, f2, f3, f4].each do |f|
+ f.brew do
+ f.install
end
+
+ Tab.create(f, DevelopmentTools.default_compiler, :libcxx).write
end
expect(f1).to be_installed
@@ -104,9 +96,7 @@ describe Homebrew::Cleanup do
expect(f3).to be_installed
expect(f4).to be_installed
- shutup do
- described_class.cleanup_formula f3
- end
+ described_class.cleanup_formula f3
expect(f1).not_to be_installed
expect(f2).not_to be_installed
@@ -119,9 +109,7 @@ describe Homebrew::Cleanup do
path.mkpath
ARGV << "--prune=all"
- shutup do
- described_class.cleanup_logs
- end
+ described_class.cleanup_logs
expect(path).not_to exist
end
@@ -131,9 +119,7 @@ describe Homebrew::Cleanup do
incomplete = (HOMEBREW_CACHE/"something.incomplete")
incomplete.mkpath
- shutup do
- described_class.cleanup_cache
- end
+ described_class.cleanup_cache
expect(incomplete).not_to exist
end
@@ -142,9 +128,7 @@ describe Homebrew::Cleanup do
java_cache = (HOMEBREW_CACHE/"java_cache")
java_cache.mkpath
- shutup do
- described_class.cleanup_cache
- end
+ described_class.cleanup_cache
expect(java_cache).not_to exist
end
@@ -153,9 +137,7 @@ describe Homebrew::Cleanup do
npm_cache = (HOMEBREW_CACHE/"npm_cache")
npm_cache.mkpath
- shutup do
- described_class.cleanup_cache
- end
+ described_class.cleanup_cache
expect(npm_cache).not_to exist
end