aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cask/cli
diff options
context:
space:
mode:
authorMarkus Reiter2017-03-15 14:01:28 +0100
committerGitHub2017-03-15 14:01:28 +0100
commite9e6dcf8930395e4284bbab07b500dd7cb5e5fe5 (patch)
tree330728e40380c2153ab948e6f20ec405b8bc598e /Library/Homebrew/test/cask/cli
parent7685618a1c110e5430a29c75f44fd3d4aee006e8 (diff)
parent48e4463f5b458c731c6bbbaa200dd805bad32de0 (diff)
downloadbrew-e9e6dcf8930395e4284bbab07b500dd7cb5e5fe5.tar.bz2
Merge pull request #2311 from nath/highlightInstalledCasks
Added highlighting of installed casks to cask search
Diffstat (limited to 'Library/Homebrew/test/cask/cli')
-rw-r--r--Library/Homebrew/test/cask/cli/search_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Homebrew/test/cask/cli/search_spec.rb b/Library/Homebrew/test/cask/cli/search_spec.rb
index 0bcff809a..9843a6de6 100644
--- a/Library/Homebrew/test/cask/cli/search_spec.rb
+++ b/Library/Homebrew/test/cask/cli/search_spec.rb
@@ -56,4 +56,16 @@ describe Hbc::CLI::Search, :cask do
Hbc::CLI::Search.run("caskroom")
}.to output(/^No Cask found for "caskroom"\.\n/).to_stdout
end
+
+ it "doesn't highlight packages that aren't installed" do
+ expect(Hbc::CLI::Search.highlight_installed("local-caffeine")).to eq("local-caffeine")
+ end
+
+ it "highlights installed packages" do
+ shutup do
+ Hbc::CLI::Install.run("local-caffeine")
+ end
+
+ expect(Hbc::CLI::Search.highlight_installed("local-caffeine")).to eq(pretty_installed("local-caffeine"))
+ end
end