From 78d4db2755995ff56736582758ad97f8d76c814c Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Thu, 6 Sep 2018 09:12:53 +0200 Subject: [PATCH] Use classes for instance doubles. --- Library/Homebrew/test/cache_store_spec.rb | 2 +- Library/Homebrew/test/cask/artifact/installer_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/test/cache_store_spec.rb b/Library/Homebrew/test/cache_store_spec.rb index f78a1719e4..b2fecff153 100644 --- a/Library/Homebrew/test/cache_store_spec.rb +++ b/Library/Homebrew/test/cache_store_spec.rb @@ -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 diff --git a/Library/Homebrew/test/cask/artifact/installer_spec.rb b/Library/Homebrew/test/cask/artifact/installer_spec.rb index d566440c0f..bfb27f43cd 100644 --- a/Library/Homebrew/test/cask/artifact/installer_spec.rb +++ b/Library/Homebrew/test/cask/artifact/installer_spec.rb @@ -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 }