You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
743 B
25 lines
743 B
13 years ago
|
require 'test_helper'
|
||
|
|
||
|
describe Cask::CLI::Linkapps do
|
||
|
it "only links casks provided in arguments" do
|
||
|
mock_cask = mock()
|
||
|
mock_cask.expects(:linkapps).twice
|
||
|
Cask.expects(:load).with('adium').returns(mock_cask)
|
||
|
|
||
|
Cask.expects(:load).with('google-chrome').returns(mock_cask)
|
||
|
Cask::CLI::Linkapps.run('adium', 'google-chrome')
|
||
|
end
|
||
|
|
||
|
it "links all installed casks when no arguments supplied" do
|
||
|
mock_cask = mock()
|
||
|
mock_cask.expects(:linkapps).times(3)
|
||
|
|
||
|
Cask.expects(:installed).returns(['foo', 'bar', 'baz'])
|
||
|
Cask.expects(:load).with('foo').returns(mock_cask)
|
||
|
Cask.expects(:load).with('bar').returns(mock_cask)
|
||
|
Cask.expects(:load).with('baz').returns(mock_cask)
|
||
|
|
||
|
Cask::CLI::Linkapps.run
|
||
|
end
|
||
|
end
|