brew/Library/Homebrew/test/cmd/reinstall_spec.rb

23 lines
543 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2017-02-23 06:04:02 +01:00
require "extend/ENV"
require "cmd/shared_examples/args_parse"
2017-02-23 06:04:02 +01:00
describe "brew reinstall" do
it_behaves_like "parseable arguments"
2017-02-23 06:04:02 +01:00
it "reinstalls a Formula", :integration_test do
install_test_formula "testball"
foo_dir = HOMEBREW_CELLAR/"testball/0.1/bin"
2017-02-23 06:04:02 +01:00
expect(foo_dir).to exist
foo_dir.rmtree
expect { brew "reinstall", "testball" }
.to output(/Reinstalling testball/).to_stdout
2017-02-23 06:04:02 +01:00
.and not_to_output.to_stderr
.and be_a_success
expect(foo_dir).to exist
end
end