Add broken test, revealing test helper flaw
This commit adds a broken test, which is meant to expose a flaw in the constructor of `Cask::Config`. That (broken) test still passes because there’s also a flaw in our test helper code. The helper flaw happens to neutralize the `Cask::Config` flaw.
This commit is contained in:
parent
dd3267ece0
commit
cad8be3278
@ -67,7 +67,18 @@ describe Cask::Config, :cask do
|
|||||||
end
|
end
|
||||||
|
|
||||||
context "when installing a cask and then adding a global default dir" do
|
context "when installing a cask and then adding a global default dir" do
|
||||||
let(:config) { described_class.new(default: { appdir: "/default/path/before/adding/fontdir" }) }
|
let(:config) {
|
||||||
|
json = <<~EOS
|
||||||
|
{
|
||||||
|
"default": {
|
||||||
|
"appdir": "/default/path/before/adding/fontdir"
|
||||||
|
},
|
||||||
|
"env": {},
|
||||||
|
"explicit": {}
|
||||||
|
}
|
||||||
|
EOS
|
||||||
|
described_class.from_json(json)
|
||||||
|
}
|
||||||
|
|
||||||
describe "#appdir" do
|
describe "#appdir" do
|
||||||
it "honors metadata of the installed cask" do
|
it "honors metadata of the installed cask" do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user