Merge pull request #4837 from reitermarkus/instance-double
Use classes for instance doubles.
This commit is contained in:
commit
271c071378
@ -98,7 +98,7 @@ describe CacheStoreDatabase do
|
|||||||
describe "#close_if_open!" do
|
describe "#close_if_open!" do
|
||||||
context "database open" do
|
context "database open" do
|
||||||
before(:each) do
|
before(:each) do
|
||||||
subject.instance_variable_set(:@db, instance_double("db", close: nil))
|
subject.instance_variable_set(:@db, instance_double(DBM, close: nil))
|
||||||
end
|
end
|
||||||
|
|
||||||
it "does not raise an error when `close` is called on the database" do
|
it "does not raise an error when `close` is called on the database" do
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
describe Hbc::Artifact::Installer, :cask do
|
describe Hbc::Artifact::Installer, :cask do
|
||||||
let(:staged_path) { mktmpdir }
|
let(:staged_path) { mktmpdir }
|
||||||
let(:cask) { instance_double("Cask", staged_path: staged_path, config: nil) }
|
let(:cask) { instance_double(Hbc::Cask, staged_path: staged_path, config: nil) }
|
||||||
subject(:installer) { described_class.new(cask, **args) }
|
subject(:installer) { described_class.new(cask, **args) }
|
||||||
let(:command) { SystemCommand }
|
let(:command) { SystemCommand }
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user