brew/Library/Homebrew/test/cask/artifact/nested_container_spec.rb

15 lines
548 B
Ruby
Raw Normal View History

2017-03-05 19:26:56 +01:00
describe Hbc::Artifact::NestedContainer, :cask do
2016-08-18 22:11:42 +03:00
describe "install" do
it "extracts the specified paths as containers" do
cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/nested-app.rb").tap do |c|
2017-02-08 14:28:18 +01:00
InstallHelper.install_without_artifacts(c)
2016-08-18 22:11:42 +03:00
end
2017-10-04 17:08:35 +02:00
cask.artifacts.select { |a| a.is_a?(described_class) }
.each { |artifact| artifact.install_phase(command: Hbc::NeverSudoSystemCommand, force: false) }
2016-08-18 22:11:42 +03:00
2017-02-08 14:28:18 +01:00
expect(cask.staged_path.join("MyNestedApp.app")).to be_a_directory
2016-08-18 22:11:42 +03:00
end
end
end