Skip to content
Snippets Groups Projects
Commit ddbb2f93 authored by Markus Reiter's avatar Markus Reiter Committed by GitHub
Browse files

Merge pull request #2117 from reitermarkus/spec-pin_unpin

Convert `brew pin` and `brew unpin` test to spec.
parents 245050e7 73be5ed9
No related branches found
No related tags found
No related merge requests found
describe "brew pin", :integration_test do
it "pins a Formula's version" do
setup_test_formula "testball"
(HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
shutup do
expect { brew "pin", "testball" }.to be_a_success
expect { brew "upgrade" }.to be_a_success
end
expect(HOMEBREW_CELLAR/"testball/0.1").not_to be_a_directory
end
end
describe "brew unpin", :integration_test do
it "unpins a Formula's version" do
setup_test_formula "testball"
(HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
shutup do
expect { brew "pin", "testball" }.to be_a_success
expect { brew "unpin", "testball" }.to be_a_success
expect { brew "upgrade" }.to be_a_success
end
expect(HOMEBREW_CELLAR/"testball/0.1").to be_a_directory
end
end
require "testing_env"
class IntegrationCommandTestPinUnpin < IntegrationCommandTestCase
def test_pin_unpin
setup_test_formula "testball"
(HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
cmd("pin", "testball")
cmd("upgrade")
refute((HOMEBREW_CELLAR/"testball/0.1").directory?,
"The latest version directory should NOT be created")
cmd("unpin", "testball")
cmd("upgrade")
assert((HOMEBREW_CELLAR/"testball/0.1").directory?,
"The latest version directory should be created")
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment