Fix tab info test
This commit is contained in:
parent
0799222df2
commit
9ff4bab171
@ -122,11 +122,16 @@ RSpec.describe Cask::Info, :cask do
|
||||
EOS
|
||||
end
|
||||
|
||||
it "prints install information for an installed Cask" do
|
||||
context "when a Cask is installed" do
|
||||
it "prints install information from tab" do
|
||||
mktmpdir do |caskroom|
|
||||
FileUtils.mkdir caskroom/"2.61"
|
||||
|
||||
cask = Cask::CaskLoader.load("local-transmission")
|
||||
time = 1_720_189_863
|
||||
tab = Cask::Tab.new(loaded_from_api: true, tabfile: TEST_FIXTURE_DIR/"cask_receipt.json", time:)
|
||||
expect(cask).to receive(:installed?).and_return(true)
|
||||
expect(cask).to receive(:caskroom_path).and_return(caskroom)
|
||||
expect(cask).to receive(:installed_version).and_return("2.61")
|
||||
expect(Cask::Tab).to receive(:for_cask).with(cask).and_return(tab)
|
||||
|
||||
@ -136,7 +141,7 @@ RSpec.describe Cask::Info, :cask do
|
||||
==> local-transmission: 2.61
|
||||
https://transmissionbt.com/
|
||||
Installed
|
||||
#{HOMEBREW_PREFIX}/Caskroom/local-transmission/2.61 (does not exist)
|
||||
#{caskroom}/2.61 (0B)
|
||||
Installed using the formulae.brew.sh API on #{Time.at(time).strftime("%Y-%m-%d at %H:%M:%S")}
|
||||
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/l/local-transmission.rb
|
||||
==> Name
|
||||
@ -148,3 +153,5 @@ RSpec.describe Cask::Info, :cask do
|
||||
EOS
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user