Raise deprecation exceptions in tests
Previously tests which hit `odeprecated` would print warnings but not always raise exceptions or fail. Combine this with the ability to have `odeprecated` to turn into `odisabled` on certain dates and you have tests that may fail just on the clock changing (this is bad). Instead, ensure that tests always raise deprecations as exceptions so that new deprecations will have their tests handled immediately.
This commit is contained in:
parent
8fa65aaabf
commit
1b4fdc17f4
@ -335,11 +335,11 @@ describe Cask::DSL, :cask do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe "depends_on macos" do
|
describe "depends_on macos" do
|
||||||
context "valid", :needs_compat do
|
context "string disabled", :needs_compat do
|
||||||
let(:token) { "compat/with-depends-on-macos-string" }
|
let(:token) { "compat/with-depends-on-macos-string" }
|
||||||
|
|
||||||
it "allows depends_on macos to be specified" do
|
it "allows depends_on macos to be specified" do
|
||||||
expect(cask.depends_on.macos).not_to be nil
|
expect { cask }.to raise_error(Cask::CaskInvalidError)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -144,6 +144,7 @@ RSpec.configure do |config|
|
|||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Homebrew.raise_deprecation_exceptions = true
|
||||||
Tap.clear_cache
|
Tap.clear_cache
|
||||||
FormulaInstaller.clear_attempted
|
FormulaInstaller.clear_attempted
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user