Skip to content
Snippets Groups Projects
Commit 0daf0168 authored by Markus Reiter's avatar Markus Reiter
Browse files

Convert Home test to spec.

parent e637eb41
No related branches found
No related tags found
No related merge requests found
require "test_helper"
require "spec_helper"
# monkeypatch for testing
module Hbc
......@@ -25,23 +25,23 @@ describe Hbc::CLI::Home do
end
it "opens the homepage for the specified Cask" do
Hbc::CLI::Home.run("alfred")
Hbc::CLI::Home.system_commands.must_equal [
["/usr/bin/open", "--", "https://www.alfredapp.com/"],
Hbc::CLI::Home.run("local-caffeine")
expect(Hbc::CLI::Home.system_commands).to eq [
["/usr/bin/open", "--", "http://example.com/local-caffeine"],
]
end
it "works for multiple Casks" do
Hbc::CLI::Home.run("alfred", "adium")
Hbc::CLI::Home.system_commands.must_equal [
["/usr/bin/open", "--", "https://www.alfredapp.com/"],
["/usr/bin/open", "--", "https://www.adium.im/"],
Hbc::CLI::Home.run("local-caffeine", "local-transmission")
expect(Hbc::CLI::Home.system_commands).to eq [
["/usr/bin/open", "--", "http://example.com/local-caffeine"],
["/usr/bin/open", "--", "http://example.com/local-transmission"],
]
end
it "opens the project page when no Cask is specified" do
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/"],
]
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment