aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/test
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-08 10:09:00 +0100
committerMarkus Reiter2017-02-10 17:19:19 +0100
commit8155d27e5c11f9d0adfbb6c911d1c5d6b479aa53 (patch)
tree035d18756abcd856e0755b78b1a1791f952d8b2e /Library/Homebrew/cask/test
parentd9d15d3670fa9f425f852feac0868ca2ace8f813 (diff)
downloadbrew-8155d27e5c11f9d0adfbb6c911d1c5d6b479aa53.tar.bz2
Convert Pre/PostflightBlock test to spec.
Diffstat (limited to 'Library/Homebrew/cask/test')
-rw-r--r--Library/Homebrew/cask/test/cask/artifact/postflight_block_test.rb41
-rw-r--r--Library/Homebrew/cask/test/cask/artifact/preflight_block_test.rb41
2 files changed, 0 insertions, 82 deletions
diff --git a/Library/Homebrew/cask/test/cask/artifact/postflight_block_test.rb b/Library/Homebrew/cask/test/cask/artifact/postflight_block_test.rb
deleted file mode 100644
index 47dcdd905..000000000
--- a/Library/Homebrew/cask/test/cask/artifact/postflight_block_test.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-require "test_helper"
-
-describe Hbc::Artifact::PostflightBlock do
- describe "install_phase" do
- it "calls the specified block after installing, passing a Cask mini-dsl" do
- called = false
- yielded_arg = nil
-
- cask = Hbc::Cask.new("with-postflight") do
- postflight do |c|
- called = true
- yielded_arg = c
- end
- end
-
- Hbc::Artifact::PostflightBlock.new(cask).install_phase
-
- called.must_equal true
- yielded_arg.must_be_kind_of Hbc::DSL::Postflight
- end
- end
-
- describe "uninstall_phase" do
- it "calls the specified block after uninstalling, passing a Cask mini-dsl" do
- called = false
- yielded_arg = nil
-
- cask = Hbc::Cask.new("with-uninstall-postflight") do
- uninstall_postflight do |c|
- called = true
- yielded_arg = c
- end
- end
-
- Hbc::Artifact::PostflightBlock.new(cask).uninstall_phase
-
- called.must_equal true
- yielded_arg.must_be_kind_of Hbc::DSL::UninstallPostflight
- end
- end
-end
diff --git a/Library/Homebrew/cask/test/cask/artifact/preflight_block_test.rb b/Library/Homebrew/cask/test/cask/artifact/preflight_block_test.rb
deleted file mode 100644
index 440b1db3a..000000000
--- a/Library/Homebrew/cask/test/cask/artifact/preflight_block_test.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-require "test_helper"
-
-describe Hbc::Artifact::PreflightBlock do
- describe "install_phase" do
- it "calls the specified block before installing, passing a Cask mini-dsl" do
- called = false
- yielded_arg = nil
-
- cask = Hbc::Cask.new("with-preflight") do
- preflight do |c|
- called = true
- yielded_arg = c
- end
- end
-
- Hbc::Artifact::PreflightBlock.new(cask).install_phase
-
- called.must_equal true
- yielded_arg.must_be_kind_of Hbc::DSL::Preflight
- end
- end
-
- describe "uninstall_phase" do
- it "calls the specified block before uninstalling, passing a Cask mini-dsl" do
- called = false
- yielded_arg = nil
-
- cask = Hbc::Cask.new("with-uninstall-preflight") do
- uninstall_preflight do |c|
- called = true
- yielded_arg = c
- end
- end
-
- Hbc::Artifact::PreflightBlock.new(cask).uninstall_phase
-
- called.must_equal true
- yielded_arg.must_be_kind_of Hbc::DSL::UninstallPreflight
- end
- end
-end