aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/blacklist_spec.rb18
-rw-r--r--Library/Homebrew/test/os/mac/blacklist_test.rb12
2 files changed, 11 insertions, 19 deletions
diff --git a/Library/Homebrew/test/blacklist_spec.rb b/Library/Homebrew/test/blacklist_spec.rb
index 89d254893..01882167d 100644
--- a/Library/Homebrew/test/blacklist_spec.rb
+++ b/Library/Homebrew/test/blacklist_spec.rb
@@ -1,12 +1,8 @@
require "blacklist"
-RSpec::Matchers.define :be_blacklisted do
- match do |actual|
- blacklisted?(actual)
- end
-end
-
describe "Blacklist" do
+ matcher(:be_blacklisted) { match(&method(:blacklisted?)) }
+
context "rubygems" do
%w[gem rubygem rubygems].each do |s|
subject { s }
@@ -103,9 +99,17 @@ describe "Blacklist" do
it { is_expected.to be_blacklisted }
end
- context "haskell_platform" do
+ context "haskell-platform" do
subject { "haskell-platform" }
it { is_expected.to be_blacklisted }
end
+
+ context "xcode", :needs_macos do
+ %w[xcode Xcode].each do |s|
+ subject { s }
+
+ it { is_expected.to be_blacklisted }
+ end
+ end
end
diff --git a/Library/Homebrew/test/os/mac/blacklist_test.rb b/Library/Homebrew/test/os/mac/blacklist_test.rb
deleted file mode 100644
index 26dd84ed9..000000000
--- a/Library/Homebrew/test/os/mac/blacklist_test.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-require "testing_env"
-require "blacklist"
-
-class OSMacBlacklistTests < Homebrew::TestCase
- def assert_blacklisted(s)
- assert blacklisted?(s), "'#{s}' should be blacklisted"
- end
-
- def test_xcode
- %w[xcode Xcode].each { |s| assert_blacklisted s }
- end
-end