diff --git a/.gitignore b/.gitignore index eaa6e54c0..ede2e75e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .ruby-version +coverage diff --git a/Gemfile b/Gemfile index bb809e42e..913bb1082 100644 --- a/Gemfile +++ b/Gemfile @@ -4,4 +4,5 @@ group :test do gem 'rake' gem 'minitest', '4.7.0' gem 'minitest-colorize' + gem 'coveralls', :require => false end diff --git a/Gemfile.lock b/Gemfile.lock index 4f4c95dbf..4f382ca18 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,15 +1,32 @@ GEM remote: https://rubygems.org/ specs: + colorize (0.5.8) + coveralls (0.6.7) + colorize + multi_json (~> 1.3) + rest-client + simplecov (>= 0.7) + thor + mime-types (1.23) minitest (4.7.0) minitest-colorize (0.0.5) minitest (>= 2.0) + multi_json (1.7.2) rake (10.0.4) + rest-client (1.6.7) + mime-types (>= 1.16) + simplecov (0.7.1) + multi_json (~> 1.0) + simplecov-html (~> 0.7.1) + simplecov-html (0.7.1) + thor (0.18.1) PLATFORMS ruby DEPENDENCIES + coveralls minitest (= 4.7.0) minitest-colorize rake diff --git a/README.md b/README.md index 380adad31..ed2a38aa7 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Build Status](https://travis-ci.org/phinze/homebrew-cask.png?branch=master)](https://travis-ci.org/phinze/homebrew-cask) [![Code Climate](https://codeclimate.com/github/phinze/homebrew-cask.png)](https://codeclimate.com/github/phinze/homebrew-cask) +[![Coverage Status](https://coveralls.io/repos/phinze/homebrew-cask/badge.png?branch=master)](https://coveralls.io/r/phinze/homebrew-cask) Let's see if we can get the elegance, simplicity, and speed of Homebrew for the installation and management GUI Mac applications like Google Chrome and Adium. diff --git a/test/cask/dsl_test.rb b/test/cask/dsl_test.rb index 87b3f6e92..6be1a0660 100644 --- a/test/cask/dsl_test.rb +++ b/test/cask/dsl_test.rb @@ -57,7 +57,7 @@ describe Cask::DSL do end instance = CaskWithLinkables.new - Array(instance.linkables[:app]).must_equal %w[Foo.app Bar.app] + Array(instance.linkables[:app]).sort.must_equal %w[Bar.app Foo.app] end it "allow linkables to be set to empty" do diff --git a/test/test_helper.rb b/test/test_helper.rb index c0aa0a9a5..791c481a9 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,3 +1,4 @@ +require 'bundler' require 'bundler/setup' @@ -31,8 +32,9 @@ Cask.default_tap = 'phinze-testcasks' # our own testy caskroom Cask.caskroom = HOMEBREW_PREFIX.join('TestCaskroom') -# silence some extraneous UI messages for tests -ENV['QUIET_TESTS'] = '1' +# coveralls.io integration +require 'coveralls' +Coveralls.wear! class TestHelper # helper for test casks to reference local files easily