diff options
| author | Vítor Galvão | 2017-02-04 19:11:40 +0000 |
|---|---|---|
| committer | GitHub | 2017-02-04 19:11:40 +0000 |
| commit | 7c368962c9fc968beb812af9d209da2038c74cfb (patch) | |
| tree | 00ca039a0df1768f71b6421bc6abe8552130983e /Library/Homebrew/cask | |
| parent | 70b1c6de0b889aabc86b1990c59994e6acb8d726 (diff) | |
| parent | 0802ad734f20c4e8507a1423513ef08301ea19d0 (diff) | |
| download | brew-7c368962c9fc968beb812af9d209da2038c74cfb.tar.bz2 | |
Merge pull request #1949 from reitermarkus/remove-test_cask
Remove `TestCask` class.
Diffstat (limited to 'Library/Homebrew/cask')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cask_loader.rb | 14 | ||||
| -rw-r--r-- | Library/Homebrew/cask/spec/spec_helper.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/cask/test/cask/cli/cat_test.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cask/test/test_helper.rb | 4 |
4 files changed, 3 insertions, 21 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cask_loader.rb b/Library/Homebrew/cask/lib/hbc/cask_loader.rb index 3875b30df..3fe02d7e1 100644 --- a/Library/Homebrew/cask/lib/hbc/cask_loader.rb +++ b/Library/Homebrew/cask/lib/hbc/cask_loader.rb @@ -32,22 +32,12 @@ module Hbc end def cask(header_token, &block) - @klass = Cask - build_cask(header_token, &block) - end - - def test_cask(header_token, &block) - @klass = TestCask - build_cask(header_token, &block) - end - - def build_cask(header_token, &block) raise CaskTokenDoesNotMatchError.new(@token, header_token) unless @token == header_token if @path.nil? - @klass.new(@token, &block) + Cask.new(@token, &block) else - @klass.new(@token, sourcefile_path: @path, &block) + Cask.new(@token, sourcefile_path: @path, &block) end end end diff --git a/Library/Homebrew/cask/spec/spec_helper.rb b/Library/Homebrew/cask/spec/spec_helper.rb index a9a5bb0a3..eefee3d60 100644 --- a/Library/Homebrew/cask/spec/spec_helper.rb +++ b/Library/Homebrew/cask/spec/spec_helper.rb @@ -21,10 +21,6 @@ Pathname.glob(HOMEBREW_LIBRARY_PATH.join("cask", "spec", "support", "*.rb")).eac require "hbc" -module Hbc - class TestCask < Cask; end -end - # create and override default directories Hbc.appdir = Pathname.new(TEST_TMPDIR).join("Applications").tap(&:mkpath) Hbc.cache.mkpath diff --git a/Library/Homebrew/cask/test/cask/cli/cat_test.rb b/Library/Homebrew/cask/test/cask/cli/cat_test.rb index df49efda0..2eca9cfe9 100644 --- a/Library/Homebrew/cask/test/cask/cli/cat_test.rb +++ b/Library/Homebrew/cask/test/cask/cli/cat_test.rb @@ -4,7 +4,7 @@ describe Hbc::CLI::Cat do describe "given a basic Cask" do before do @expected_output = <<-EOS.undent - test_cask 'basic-cask' do + cask 'basic-cask' do version '1.2.3' sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b' diff --git a/Library/Homebrew/cask/test/test_helper.rb b/Library/Homebrew/cask/test/test_helper.rb index 641409284..71ce5752e 100644 --- a/Library/Homebrew/cask/test/test_helper.rb +++ b/Library/Homebrew/cask/test/test_helper.rb @@ -35,10 +35,6 @@ Mocha::Integration::MiniTest.activate # our baby require "hbc" -module Hbc - class TestCask < Cask; end -end - # create and override default directories Hbc.appdir = Pathname.new(TEST_TMPDIR).join("Applications").tap(&:mkpath) Hbc.cache.mkpath |
