Browse Source
should address #52 includes better error handling if a nonexistent cask is referenced first test-driven commit, suckas!
phinze
12 years ago
5 changed files with 35 additions and 5 deletions
@ -0,0 +1,20 @@ |
|||
require 'test_helper' |
|||
|
|||
describe Cask::CLI::Install do |
|||
it "allows install of multiple casks at once" do |
|||
stub_cask = stub(:install => nil) |
|||
Cask.expects(:load).with('adium').returns(stub_cask) |
|||
Cask.expects(:load).with('google-chrome').returns(stub_cask) |
|||
Cask::CLI::Install.run('adium', 'google-chrome') |
|||
end |
|||
|
|||
it "properly handles casks that are not present" do |
|||
stub_cask = stub(:install => nil) |
|||
Cask.expects(:load).with('adium').returns(stub_cask) |
|||
Cask.expects(:load).with('what-the-balls').raises(CaskUnavailableError.new('what-the-balls')) |
|||
Cask.expects(:load).with('google-chrome').returns(stub_cask) |
|||
shutup do |
|||
Cask::CLI::Install.run('adium', 'what-the-balls', 'google-chrome') |
|||
end |
|||
end |
|||
end |
Loading…
Reference in new issue