aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2017-01-26 12:01:54 +0000
committerMike McQuaid2017-01-26 12:01:54 +0000
commit92b48ac42e84eb4c113bb3fb362f83b51282c99f (patch)
tree778db4f49ec4f1f90f57bb6332f31ceaaf5652c1 /Library
parentb5f1db5f291dfbba54f373dbfac13c3be711d756 (diff)
downloadbrew-92b48ac42e84eb4c113bb3fb362f83b51282c99f.tar.bz2
brew-cask-tests: import Rakefile logic.
This avoids a `rake` dependency in the Gemfile and an unnecessary shell out.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cask/Rakefile17
-rwxr-xr-xLibrary/Homebrew/cask/cmd/brew-cask-tests.rb5
2 files changed, 4 insertions, 18 deletions
diff --git a/Library/Homebrew/cask/Rakefile b/Library/Homebrew/cask/Rakefile
deleted file mode 100644
index b2b9fce52..000000000
--- a/Library/Homebrew/cask/Rakefile
+++ /dev/null
@@ -1,17 +0,0 @@
-require "rake/testtask"
-require "rspec/core/rake_task"
-
-$LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_REPOSITORY"]}/Library/Homebrew"))
-$LOAD_PATH.unshift(File.expand_path("../lib", __FILE__))
-
-namespace :test do
- namespace :coverage do
- desc "Upload coverage to Codecov"
- task :upload do
- require "simplecov"
- require "codecov"
- formatter = SimpleCov::Formatter::Codecov.new
- formatter.format(SimpleCov::ResultMerger.merged_result)
- end
- end
-end
diff --git a/Library/Homebrew/cask/cmd/brew-cask-tests.rb b/Library/Homebrew/cask/cmd/brew-cask-tests.rb
index 43683a263..94902e41c 100755
--- a/Library/Homebrew/cask/cmd/brew-cask-tests.rb
+++ b/Library/Homebrew/cask/cmd/brew-cask-tests.rb
@@ -52,6 +52,9 @@ repo_root.cd do
if upload_coverage
puts "Submitting Codecov coverage..."
- system "bundle", "exec", "rake", "test:coverage:upload"
+ require "simplecov"
+ require "codecov"
+ formatter = SimpleCov::Formatter::Codecov.new
+ formatter.format(SimpleCov::ResultMerger.merged_result)
end
end