diff --git a/Library/Homebrew/test/cmd/reinstall_spec.rb b/Library/Homebrew/test/cmd/reinstall_spec.rb index fd5690de26..9452e9b1cb 100644 --- a/Library/Homebrew/test/cmd/reinstall_spec.rb +++ b/Library/Homebrew/test/cmd/reinstall_spec.rb @@ -20,4 +20,18 @@ RSpec.describe Homebrew::Cmd::Reinstall do expect(foo_dir).to exist end + + it "reinstalls a Formula with ask input", :integration_test do + install_test_formula "testball" + foo_dir = HOMEBREW_CELLAR/"testball/0.1/bin" + expect(foo_dir).to exist + FileUtils.rm_r(foo_dir) + + expect { brew "reinstall", "--ask", "testball" } + .to output(/.*Formula\s*\(1\):\s*testball.*/).to_stdout + .and not_to_output.to_stderr + .and be_a_success + + expect(foo_dir).to exist + end end