change cask spec to formula one
This commit is contained in:
parent
7d90e3a2a1
commit
dfee012f77
@ -19,25 +19,27 @@ describe "brew fetch" do
|
||||
expect(HOMEBREW_CACHE/"testball--0.1.tbz").to exist
|
||||
end
|
||||
|
||||
it "prevents double fetch (without nuking existing installation)", :integration_test, :needs_macos do
|
||||
cached_location = Cask::Download.new(local_transmission).fetch
|
||||
it "prevents double fetch (without nuking existing installation)", :integration_test do
|
||||
setup_test_formula "testball"
|
||||
brew "fetch", "testball"
|
||||
|
||||
old_ctime = File.stat(cached_location).ctime
|
||||
old_ctime = File.stat(HOMEBREW_CACHE/"testball--0.1.tbz").ctime
|
||||
|
||||
expect { brew "fetch", "local-transmission", "--cask", "--no-quarantine" }.to be_a_success
|
||||
new_ctime = File.stat(cached_location).ctime
|
||||
expect { brew "fetch", "testball", "--no-quarantine" }.to be_a_success
|
||||
new_ctime = File.stat(HOMEBREW_CACHE/"testball--0.1.tbz").ctime
|
||||
|
||||
expect(old_ctime.to_i).to eq(new_ctime.to_i)
|
||||
end
|
||||
|
||||
it "allows double fetch with --force", :integration_test, :needs_macos do
|
||||
cached_location = Cask::Download.new(local_transmission).fetch
|
||||
it "allows double fetch with --force", :integration_test do
|
||||
setup_test_formula "testball"
|
||||
brew "fetch", "testball"
|
||||
|
||||
old_ctime = File.stat(cached_location).ctime
|
||||
old_ctime = File.stat(HOMEBREW_CACHE/"testball--0.1.tbz").ctime
|
||||
sleep(1)
|
||||
|
||||
expect { brew "fetch", "local-transmission", "--cask", "--force", "--no-quarantine" }.to be_a_success
|
||||
new_ctime = File.stat(cached_location).ctime
|
||||
expect { brew "fetch", "testball", "--force", "--no-quarantine" }.to be_a_success
|
||||
new_ctime = File.stat(HOMEBREW_CACHE/"testball--0.1.tbz").ctime
|
||||
|
||||
expect(new_ctime.to_i).to be > old_ctime.to_i
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user