21 Commits

Author SHA1 Message Date
Issy Long
6b76fd012a
Fix (auto-correct) RuboCop RSpec/BeNil offenses 2022-03-01 00:10:10 +00:00
nandahkrishna
e64f2d1fd4
test/exceptions_spec: add test for TapFormulaOrCaskUnavailableError 2021-03-12 01:28:20 +05:30
Bo Anderson
f079373d8c
utils/fork: handle termsig in safe_fork 2021-02-25 13:42:44 +00:00
Issy Long
e1ad07190e
rubocop: Fix RSpec/ContextWording offenses
- For some of these I changed `context` to `describe` as it fit better
  rather than contriving a "when", "with" or "without", or massively
  restructuring the tests.
2021-02-19 23:30:41 +00:00
Rylan Polster
d5d7b6c3db
style: remove RSpec/MultipleDescribes violations
Co-authored-by: Nanda H Krishna <nanda.harishankar@gmail.com>
2021-02-01 20:30:51 -05:00
Rylan Polster
af40e072b0
style: remove RSpec/NamedSubject violations 2021-02-01 20:30:51 -05:00
Markus Reiter
7d9758a05e Fix RuboCop offenses. 2020-11-30 22:50:15 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Misty De Meo
c06848c487
Fix printing MultipleVersionsInstalledError details
The refactor in 6e8f5d0958247e4b4d629866099ed2836a0e0863 means that the
exception no longer exposes the name of the package with multiple versions,
and as a result the rescuer is unable to print this information.

Because we now have a path in which MultipleVersionsInstalledError doesn't
have the name at all, we can't reasonably restore the old behaviour.
And since rack resolution happens purely internal to the function that
raises the exception, the caller has no way to know what name to use.
However, since the exception text gets printed anyway, we can just move
this text into the exception itself.

Fixes the following error:

```
Error: mpd has multiple installed versions
Error: undefined method `name' for #<MultipleVersionsInstalledError:0x00007fc6009d8870>
/usr/local/Homebrew/Library/Homebrew/cmd/uninstall.rb:137:in `rescue in uninstall'
/usr/local/Homebrew/Library/Homebrew/cmd/uninstall.rb:135:in `uninstall'
/usr/local/Homebrew/Library/Homebrew/brew.rb:119:in `<main>'
```
2020-09-09 11:56:53 -07:00
Mike McQuaid
fb0a6338b1
Remove more tap pinning code.
This was deprecated and removed a while ago.
2020-08-06 12:24:10 +01:00
William Ma
6e8f5d0958 Modify MultipleVersionsInstalledError to have a generic message 2020-07-03 18:25:49 -04:00
Jacob Middag
c6cb20a768
Fix frozen string bug 2019-10-11 09:34:43 +02:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
359fb27cfe
Manually fix RuboCop RSpec autofix failures. 2018-09-20 13:40:38 +01:00
Mike McQuaid
78eba5b815
Autofix RuboCop RSpec failures 2018-09-20 13:36:42 +01:00
Reto Kromer
d630f0885b more secure protocols 2018-08-06 16:23:07 +02:00
Markus Reiter
2452b27866 Refactor ErrorDuringExecution. 2018-07-19 16:41:27 +02:00
Mike McQuaid
5e1806e796 test: rubocop-rspec style auto-corrects.
There’s too many warnings to start enabling `rubocop-rspec` by default
but let’s at least apply the cleanups it does automatically.
2018-03-25 13:30:37 +01:00
Shaun Jackman
3ed832d4f0 BottleLoader: Use the formula stored in the bottle 2017-09-28 12:29:23 -07:00
Markus Reiter
279831fc0e Convert Exceptions test to spec. 2017-02-15 15:53:27 +01:00