Convert Home test to spec.
This commit is contained in:
parent
e637eb414e
commit
0daf016812
@ -1,4 +1,4 @@
|
|||||||
require "test_helper"
|
require "spec_helper"
|
||||||
|
|
||||||
# monkeypatch for testing
|
# monkeypatch for testing
|
||||||
module Hbc
|
module Hbc
|
||||||
@ -25,23 +25,23 @@ describe Hbc::CLI::Home do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "opens the homepage for the specified Cask" do
|
it "opens the homepage for the specified Cask" do
|
||||||
Hbc::CLI::Home.run("alfred")
|
Hbc::CLI::Home.run("local-caffeine")
|
||||||
Hbc::CLI::Home.system_commands.must_equal [
|
expect(Hbc::CLI::Home.system_commands).to eq [
|
||||||
["/usr/bin/open", "--", "https://www.alfredapp.com/"],
|
["/usr/bin/open", "--", "http://example.com/local-caffeine"],
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
it "works for multiple Casks" do
|
it "works for multiple Casks" do
|
||||||
Hbc::CLI::Home.run("alfred", "adium")
|
Hbc::CLI::Home.run("local-caffeine", "local-transmission")
|
||||||
Hbc::CLI::Home.system_commands.must_equal [
|
expect(Hbc::CLI::Home.system_commands).to eq [
|
||||||
["/usr/bin/open", "--", "https://www.alfredapp.com/"],
|
["/usr/bin/open", "--", "http://example.com/local-caffeine"],
|
||||||
["/usr/bin/open", "--", "https://www.adium.im/"],
|
["/usr/bin/open", "--", "http://example.com/local-transmission"],
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
it "opens the project page when no Cask is specified" do
|
it "opens the project page when no Cask is specified" do
|
||||||
Hbc::CLI::Home.run
|
Hbc::CLI::Home.run
|
||||||
Hbc::CLI::Home.system_commands.must_equal [
|
expect(Hbc::CLI::Home.system_commands).to eq [
|
||||||
["/usr/bin/open", "--", "http://caskroom.io/"],
|
["/usr/bin/open", "--", "http://caskroom.io/"],
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user