From 17fd7d6ebbfcddeb0be7f504600d69f32343dd86 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Wed, 8 Feb 2017 09:18:48 +0100 Subject: Convert `staged` test to spec. --- Library/Homebrew/cask/spec/cask/staged_spec.rb | 18 ++++++++++++++++++ Library/Homebrew/cask/test/cask/staged_test.rb | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 Library/Homebrew/cask/spec/cask/staged_spec.rb delete mode 100644 Library/Homebrew/cask/test/cask/staged_test.rb (limited to 'Library/Homebrew') diff --git a/Library/Homebrew/cask/spec/cask/staged_spec.rb b/Library/Homebrew/cask/spec/cask/staged_spec.rb new file mode 100644 index 000000000..10f1cbb47 --- /dev/null +++ b/Library/Homebrew/cask/spec/cask/staged_spec.rb @@ -0,0 +1,18 @@ +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 + shutup do + installer.install + end + + expect(installer.bundle_identifier).to eq("org.m0k.transmission") + end + end +end diff --git a/Library/Homebrew/cask/test/cask/staged_test.rb b/Library/Homebrew/cask/test/cask/staged_test.rb deleted file mode 100644 index 2b601a6ae..000000000 --- a/Library/Homebrew/cask/test/cask/staged_test.rb +++ /dev/null @@ -1,18 +0,0 @@ -require "test_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 - 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 - end - tr_installer.bundle_identifier.must_equal("org.m0k.transmission") - end - end -end -- cgit v1.2.3