Convert staged test to spec.

This commit is contained in:
Markus Reiter 2017-02-08 09:18:48 +01:00
parent af8b91746c
commit 17fd7d6ebb

View File

@ -1,18 +1,18 @@
require "test_helper"
require "spec_helper"
# TODO: this test should be named after the corresponding class, once
# that class is abstracted from installer.rb. It makes little sense
# to be invoking bundle_identifier off of the installer instance.
describe "Operations on staged Casks" do
describe "bundle ID" do
let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") }
let(:installer) { Hbc::Installer.new(cask) }
it "fetches the bundle ID from a staged cask" do
transmission_cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb")
tr_installer = Hbc::Installer.new(transmission_cask)
shutup do
tr_installer.install
installer.install
end
tr_installer.bundle_identifier.must_equal("org.m0k.transmission")
expect(installer.bundle_identifier).to eq("org.m0k.transmission")
end
end
end