aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/test
diff options
context:
space:
mode:
authorMarkus Reiter2016-10-14 20:03:34 +0200
committerMarkus Reiter2016-10-23 14:32:03 +0200
commit1a0f8b8a02cfe8795e2128fb294e97bb67fb03f0 (patch)
treed877104219e739733aacf73bd6f040f48bb2ff66 /Library/Homebrew/cask/test
parent40b7e36746f679c41f97e627f2af0e898963925b (diff)
downloadbrew-1a0f8b8a02cfe8795e2128fb294e97bb67fb03f0.tar.bz2
Use slash-delimited regular expressions.
Diffstat (limited to 'Library/Homebrew/cask/test')
-rw-r--r--Library/Homebrew/cask/test/cask/artifact/app_test.rb2
-rw-r--r--Library/Homebrew/cask/test/cask/cli/install_test.rb8
-rw-r--r--Library/Homebrew/cask/test/cask/cli/search_test.rb12
-rw-r--r--Library/Homebrew/cask/test/cask/cli/uninstall_test.rb2
-rw-r--r--Library/Homebrew/cask/test/cask/dsl_test.rb6
-rw-r--r--Library/Homebrew/cask/test/cask/installer_test.rb4
6 files changed, 17 insertions, 17 deletions
diff --git a/Library/Homebrew/cask/test/cask/artifact/app_test.rb b/Library/Homebrew/cask/test/cask/artifact/app_test.rb
index 648146f9a..acd5b2b63 100644
--- a/Library/Homebrew/cask/test/cask/artifact/app_test.rb
+++ b/Library/Homebrew/cask/test/cask/artifact/app_test.rb
@@ -243,7 +243,7 @@ describe Hbc::Artifact::App do
describe "app is missing" do
it "returns a warning and the supposed path to the app" do
contents.size.must_equal 1
- contents[0].must_match(%r{.*Missing App.*: #{target_path}})
+ contents[0].must_match(/.*Missing App.*: #{target_path}/)
end
end
end
diff --git a/Library/Homebrew/cask/test/cask/cli/install_test.rb b/Library/Homebrew/cask/test/cask/cli/install_test.rb
index 57d7e0d7e..c778d0d3c 100644
--- a/Library/Homebrew/cask/test/cask/cli/install_test.rb
+++ b/Library/Homebrew/cask/test/cask/cli/install_test.rb
@@ -29,7 +29,7 @@ describe Hbc::CLI::Install do
lambda {
Hbc::CLI::Install.run("local-transmission", "")
- }.must_output nil, %r{Warning: A Cask for local-transmission is already installed.}
+ }.must_output nil, /Warning: A Cask for local-transmission is already installed./
end
it "allows double install with --force" do
@@ -39,7 +39,7 @@ describe Hbc::CLI::Install do
lambda {
Hbc::CLI::Install.run("local-transmission", "--force")
- }.must_output %r{==> Success! local-transmission was successfully installed!}
+ }.must_output(/==> Success! local-transmission was successfully installed!/)
end
it "skips dependencies with --skip-cask-deps" do
@@ -64,7 +64,7 @@ describe Hbc::CLI::Install do
begin
Hbc::CLI::Install.run("googlechrome")
rescue Hbc::CaskError; end
- }.must_output nil, %r{No available Cask for googlechrome\. Did you mean:\ngoogle-chrome}
+ }.must_output nil, /No available Cask for googlechrome\. Did you mean:\ngoogle-chrome/
end
it "returns multiple suggestions for a Cask fragment" do
@@ -72,7 +72,7 @@ describe Hbc::CLI::Install do
begin
Hbc::CLI::Install.run("google")
rescue Hbc::CaskError; end
- }.must_output nil, %r{No available Cask for google\. Did you mean one of:\ngoogle}
+ }.must_output nil, /No available Cask for google\. Did you mean one of:\ngoogle/
end
describe "when no Cask is specified" do
diff --git a/Library/Homebrew/cask/test/cask/cli/search_test.rb b/Library/Homebrew/cask/test/cask/cli/search_test.rb
index 4b15d8eab..6eb6badb9 100644
--- a/Library/Homebrew/cask/test/cask/cli/search_test.rb
+++ b/Library/Homebrew/cask/test/cask/cli/search_test.rb
@@ -19,25 +19,25 @@ describe Hbc::CLI::Search do
it "lists all available Casks with no search term" do
out = capture_io { Hbc::CLI::Search.run }[0]
- out.must_match(%r{google-chrome})
+ out.must_match(/google-chrome/)
out.length.must_be :>, 1000
end
it "ignores hyphens in search terms" do
out = capture_io { Hbc::CLI::Search.run("goo-gle-chrome") }[0]
- out.must_match(%r{google-chrome})
+ out.must_match(/google-chrome/)
out.length.must_be :<, 100
end
it "ignores hyphens in Cask tokens" do
out = capture_io { Hbc::CLI::Search.run("googlechrome") }[0]
- out.must_match(%r{google-chrome})
+ out.must_match(/google-chrome/)
out.length.must_be :<, 100
end
it "accepts multiple arguments" do
out = capture_io { Hbc::CLI::Search.run("google chrome") }[0]
- out.must_match(%r{google-chrome})
+ out.must_match(/google-chrome/)
out.length.must_be :<, 100
end
@@ -49,11 +49,11 @@ describe Hbc::CLI::Search do
it "Returns both exact and partial matches" do
out = capture_io { Hbc::CLI::Search.run("mnemosyne") }[0]
- out.must_match(%r{^==> Exact match\nmnemosyne\n==> Partial matches\nsubclassed-mnemosyne})
+ out.must_match(/^==> Exact match\nmnemosyne\n==> Partial matches\nsubclassed-mnemosyne/)
end
it "does not search the Tap name" do
out = capture_io { Hbc::CLI::Search.run("caskroom") }[0]
- out.must_match(%r{^No Cask found for "caskroom"\.\n})
+ out.must_match(/^No Cask found for "caskroom"\.\n/)
end
end
diff --git a/Library/Homebrew/cask/test/cask/cli/uninstall_test.rb b/Library/Homebrew/cask/test/cask/cli/uninstall_test.rb
index 6e0ea773b..0368ad87c 100644
--- a/Library/Homebrew/cask/test/cask/cli/uninstall_test.rb
+++ b/Library/Homebrew/cask/test/cask/cli/uninstall_test.rb
@@ -93,7 +93,7 @@ describe Hbc::CLI::Uninstall do
Hbc::CLI::Uninstall.run("versioned-cask")
end
- out.must_match(%r{#{token} #{first_installed_version} is still installed.})
+ out.must_match(/#{token} #{first_installed_version} is still installed./)
err.must_be :empty?
end
end
diff --git a/Library/Homebrew/cask/test/cask/dsl_test.rb b/Library/Homebrew/cask/test/cask/dsl_test.rb
index 4b3f88b1f..d062875fa 100644
--- a/Library/Homebrew/cask/test/cask/dsl_test.rb
+++ b/Library/Homebrew/cask/test/cask/dsl_test.rb
@@ -250,7 +250,7 @@ describe Hbc::DSL do
describe "appcast stanza" do
it "allows appcasts to be specified" do
cask = Hbc.load("with-appcast")
- cask.appcast.to_s.must_match %r{^http}
+ cask.appcast.to_s.must_match(/^http/)
end
it "prevents defining multiple appcasts" do
@@ -270,12 +270,12 @@ describe Hbc::DSL do
describe "gpg stanza" do
it "allows gpg stanza to be specified" do
cask = Hbc.load("with-gpg")
- cask.gpg.to_s.must_match %r{\S}
+ cask.gpg.to_s.must_match(/\S/)
end
it "allows gpg stanza to be specified with :key_url" do
cask = Hbc.load("with-gpg-key-url")
- cask.gpg.to_s.must_match %r{\S}
+ cask.gpg.to_s.must_match(/\S/)
end
it "prevents specifying gpg stanza multiple times" do
diff --git a/Library/Homebrew/cask/test/cask/installer_test.rb b/Library/Homebrew/cask/test/cask/installer_test.rb
index 9253f40e7..f64ed8c17 100644
--- a/Library/Homebrew/cask/test/cask/installer_test.rb
+++ b/Library/Homebrew/cask/test/cask/installer_test.rb
@@ -239,7 +239,7 @@ describe Hbc::Installer do
with_caveats = Hbc.load("with-caveats")
lambda {
Hbc::Installer.new(with_caveats).install
- }.must_output %r{Here are some things you might want to know}
+ }.must_output(/Here are some things you might want to know/)
with_caveats.must_be :installed?
end
@@ -247,7 +247,7 @@ describe Hbc::Installer do
with_installer_manual = Hbc.load("with-installer-manual")
lambda {
Hbc::Installer.new(with_installer_manual).install
- }.must_output %r{To complete the installation of Cask with-installer-manual, you must also\nrun the installer at\n\n '#{with_installer_manual.staged_path.join('Caffeine.app')}'}
+ }.must_output(/To complete the installation of Cask with-installer-manual, you must also\nrun the installer at\n\n '#{with_installer_manual.staged_path.join('Caffeine.app')}'/)
with_installer_manual.must_be :installed?
end