diff options
| author | Markus Reiter | 2017-02-08 11:58:34 +0100 |
|---|---|---|
| committer | Markus Reiter | 2017-02-10 17:19:19 +0100 |
| commit | 9e31b51cb0f14ca8e9491de90248532fc44f123f (patch) | |
| tree | dca86cd0c71ab4255b764df766cdfd352c78d0ba /Library/Homebrew/cask/test | |
| parent | d197e79d35c121fbd79491886cf6d13b8037faef (diff) | |
| download | brew-9e31b51cb0f14ca8e9491de90248532fc44f123f.tar.bz2 | |
Convert Audit test to spec.
Diffstat (limited to 'Library/Homebrew/cask/test')
| -rw-r--r-- | Library/Homebrew/cask/test/cask/cli/audit_test.rb | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/Library/Homebrew/cask/test/cask/cli/audit_test.rb b/Library/Homebrew/cask/test/cask/cli/audit_test.rb deleted file mode 100644 index 89a7d140a..000000000 --- a/Library/Homebrew/cask/test/cask/cli/audit_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -require "test_helper" - -describe Hbc::CLI::Audit do - let(:auditor) { mock } - let(:cask) { mock } - - describe "selection of Casks to audit" do - it "audits all Casks if no tokens are given" do - Hbc.stub :all, [cask, cask] do - auditor.expects(:audit).times(2) - - run_audit([], auditor) - end - end - - it "audits specified Casks if tokens are given" do - cask_token = "nice-app" - Hbc.expects(:load).with(cask_token).returns(cask) - auditor.expects(:audit).with(cask, audit_download: false, check_token_conflicts: false) - - run_audit([cask_token], auditor) - end - end - - describe "rules for downloading a Cask" do - it "does not download the Cask per default" do - Hbc.stub :load, cask do - auditor.expects(:audit).with(cask, audit_download: false, check_token_conflicts: false) - - run_audit(["casktoken"], auditor) - end - end - - it "download a Cask if --download flag is set" do - Hbc.stub :load, cask do - auditor.expects(:audit).with(cask, audit_download: true, check_token_conflicts: false) - - run_audit(["casktoken", "--download"], auditor) - end - end - end - - describe "rules for checking token conflicts" do - it "does not check for token conflicts per default" do - Hbc.stub :load, cask do - auditor.expects(:audit).with(cask, audit_download: false, check_token_conflicts: false) - - run_audit(["casktoken"], auditor) - end - end - - it "checks for token conflicts if --token-conflicts flag is set" do - Hbc.stub :load, cask do - auditor.expects(:audit).with(cask, audit_download: false, check_token_conflicts: true) - - run_audit(["casktoken", "--token-conflicts"], auditor) - end - end - end - - def run_audit(args, auditor) - Hbc::CLI::Audit.new(args, auditor).run - end -end |
