2019-04-19 15:38:03 +09:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2024-04-01 09:44:14 -07:00
|
|
|
require "cmd/pin"
|
2019-03-28 08:35:36 +00:00
|
|
|
require "cmd/shared_examples/args_parse"
|
|
|
|
|
2024-04-01 09:44:14 -07:00
|
|
|
RSpec.describe Homebrew::Cmd::Pin do
|
2019-03-28 08:35:36 +00:00
|
|
|
it_behaves_like "parseable arguments"
|
|
|
|
|
2021-02-01 16:14:25 -05:00
|
|
|
it "pins a Formula's version", :integration_test do
|
2019-03-28 08:35:36 +00:00
|
|
|
install_test_formula "testball"
|
2017-02-23 06:07:53 +01:00
|
|
|
|
2017-07-29 19:55:05 +02:00
|
|
|
expect { brew "pin", "testball" }.to be_a_success
|
2017-02-23 06:07:53 +01:00
|
|
|
end
|
2025-07-04 13:28:54 -07:00
|
|
|
|
|
|
|
it "fails with an uninstalled Formula", :integration_test do
|
|
|
|
setup_test_formula "testball"
|
|
|
|
|
|
|
|
expect { brew "pin", "testball" }.to be_a_failure
|
|
|
|
end
|
2017-02-23 06:07:53 +01:00
|
|
|
end
|