Browse Source

rename 'open' -> 'home' to match homebrew

closes #167
phinze 12 years ago
parent
commit
0dbb81b0e1
  1. 2
      lib/cask/cli/home.rb
  2. 14
      test/cli/home_test.rb

2
lib/cask/cli/open.rb → lib/cask/cli/home.rb

@ -1,4 +1,4 @@
module Cask::CLI::Open
module Cask::CLI::Home
def self.run(*cask_names)
cask_names.each do |cask_name|
begin

14
test/cli/open_test.rb → test/cli/home_test.rb

@ -14,25 +14,25 @@ module RecordSystemCalls
end
end
module Cask::CLI::Open
module Cask::CLI::Home
extend RecordSystemCalls
end
describe Cask::CLI::Open do
describe Cask::CLI::Home do
before do
Cask::CLI::Open.reset!
Cask::CLI::Home.reset!
end
it 'opens the homepage for the specified cask' do
Cask::CLI::Open.run('alfred')
Cask::CLI::Open.system_commands.must_equal [
Cask::CLI::Home.run('alfred')
Cask::CLI::Home.system_commands.must_equal [
['open', 'http://www.alfredapp.com/']
]
end
it 'works for multiple casks' do
Cask::CLI::Open.run('alfred', 'adium')
Cask::CLI::Open.system_commands.must_equal [
Cask::CLI::Home.run('alfred', 'adium')
Cask::CLI::Home.system_commands.must_equal [
['open', 'http://www.alfredapp.com/'],
['open', 'http://www.adium.im/']
]
Loading…
Cancel
Save