mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-17 06:16:47 -06:00
* convert existing Cask:: namespace to Hbc:: * move Homebrew-fork code under Hbc:: * move freestanding classes such as Tty and TopologicalHash under Hbc:: * recast HOMEBREW_CASK_ constants as HBC_ * modify our Homebrew Formula for backward compatibility * devscripts and dev docs
31 lines
823 B
Ruby
31 lines
823 B
Ruby
require 'test_helper'
|
|
|
|
describe Hbc::Artifact::Pkg do
|
|
before {
|
|
@cask = Hbc.load('with-installable')
|
|
shutup do
|
|
TestHelper.install_without_artifacts(@cask)
|
|
end
|
|
}
|
|
|
|
describe 'install_phase' do
|
|
it 'runs the system installer on the specified pkgs' do
|
|
pkg = Hbc::Artifact::Pkg.new(@cask, Hbc::FakeSystemCommand)
|
|
|
|
Hbc::FakeSystemCommand.expects_command(['/usr/bin/sudo', '-E', '--', '/usr/sbin/installer', '-pkg', @cask.staged_path.join('MyFancyPkg','Fancy.pkg'), '-target', '/'])
|
|
|
|
shutup do
|
|
pkg.install_phase
|
|
end
|
|
end
|
|
end
|
|
|
|
describe 'uninstall_phase' do
|
|
it 'does nothing, because the uninstall_phase method is a no-op' do
|
|
pkg = Hbc::Artifact::Pkg.new(@cask, Hbc::FakeSystemCommand)
|
|
shutup do
|
|
pkg.uninstall_phase
|
|
end
|
|
end
|
|
end
|
|
end
|