Merge pull request #4837 from reitermarkus/instance-double

Use classes for instance doubles.
This commit is contained in:
Markus Reiter 2018-09-06 09:29:30 +02:00 committed by GitHub
commit 271c071378
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ describe CacheStoreDatabase do
describe "#close_if_open!" do
context "database open" 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
it "does not raise an error when `close` is called on the database" do

View File

@ -1,6 +1,6 @@
describe Hbc::Artifact::Installer, :cask do
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) }
let(:command) { SystemCommand }