diff options
| author | Markus Reiter | 2017-02-21 06:09:09 +0100 |
|---|---|---|
| committer | Markus Reiter | 2017-02-21 06:09:09 +0100 |
| commit | 15d681064173f06c5ca9de665d90cc9f036c6613 (patch) | |
| tree | 11822ef716bf84ab753e7435c9d4b6319b711d79 /Library/Homebrew/test/blacklist_spec.rb | |
| parent | bd0a1314c8a2676a69b81ba840fb7ea6e50ae736 (diff) | |
| download | brew-15d681064173f06c5ca9de665d90cc9f036c6613.tar.bz2 | |
Convert `os/mac/blacklist` test to spec.
Diffstat (limited to 'Library/Homebrew/test/blacklist_spec.rb')
| -rw-r--r-- | Library/Homebrew/test/blacklist_spec.rb | 18 |
1 files changed, 11 insertions, 7 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 |
