diff --git a/test/cask/artifact/zap_test.rb b/test/cask/artifact/zap_test.rb index cf00dfaf406..9aebd4e076d 100644 --- a/test/cask/artifact/zap_test.rb +++ b/test/cask/artifact/zap_test.rb @@ -37,6 +37,8 @@ describe Hbc::Artifact::Zap do Hbc::FakeSystemCommand.stubs_command(['/usr/bin/sudo', '-E', '--', '/usr/bin/osascript', '-e', 'tell application "System Events" to count processes whose bundle identifier is "my.fancy.package.app"'], '1') Hbc::FakeSystemCommand.stubs_command(['/usr/bin/sudo', '-E', '--', '/usr/bin/osascript', '-e', 'tell application id "my.fancy.package.app" to quit']) + Hbc::FakeSystemCommand.expects_command(['/usr/bin/osascript', '-e', 'tell application "System Events" to delete every login item whose name is "Fancy"']) + Hbc::FakeSystemCommand.expects_command(['/usr/bin/sudo', '-E', '--', @cask.staged_path.join('MyFancyPkg','FancyUninstaller.tool'), '--please']) Hbc::FakeSystemCommand.expects_command(['/usr/bin/sudo', '-E', '--', '/bin/rm', '-rf', '--', Pathname.new('~/Library/Preferences/my.fancy.app.plist').expand_path]) diff --git a/test/support/Casks/with-zap.rb b/test/support/Casks/with-zap.rb index 30634d2bd81..c141837d621 100644 --- a/test/support/Casks/with-zap.rb +++ b/test/support/Casks/with-zap.rb @@ -12,5 +12,6 @@ cask :v1test => 'with-zap' do :args => %w[--please] }, :quit => 'my.fancy.package.app', + :login_item => 'Fancy', :delete => '~/Library/Preferences/my.fancy.app.plist' end