aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/reinstall_pinned_test.rb
blob: 80f5518ea91e60d2b04ffef7fca95339bb1c50e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require "testing_env"

class IntegrationCommandTestReinstallPinned < IntegrationCommandTestCase
  def test_reinstall_pinned
    setup_test_formula "testball"

    HOMEBREW_CELLAR.join("testball/0.1").mkpath
    HOMEBREW_PINNED_KEGS.mkpath
    FileUtils.ln_s HOMEBREW_CELLAR.join("testball/0.1"), HOMEBREW_PINNED_KEGS/"testball"

    assert_match "testball is pinned. You must unpin it to reinstall.", cmd("reinstall", "testball")

    HOMEBREW_PINNED_KEGS.rmtree
  end
end