diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-19 17:39:56 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-19 17:39:56 +0400 |
commit | fe314d460efd18ea064df987a5a215904b95fd4e (patch) | |
tree | d6af4bdeb3edcd80b077ff35f5ba7a462f9310d0 /features/support | |
parent | 6298e55795f4cfa624bfd91bfe716cc21beb8544 (diff) |
Refactor coverage tools usage
rspec spec # no coverage generated
SIMPLECOV=true rspec spec # generate coverage locally into ./coverage
COVERALLS=true rspec spec # generate and send coverage data to coveralls.io
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'features/support')
-rw-r--r-- | features/support/env.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/features/support/env.rb b/features/support/env.rb index bb4249efe20..4b76faab564 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1,20 +1,20 @@ -require 'simplecov' unless ENV['CI'] +if ENV['SIMPLECOV'] + require 'simplecov' +end -if ENV['TRAVIS'] +if ENV['COVERALLS'] require 'coveralls' - Coveralls.wear_merged! + Coveralls.wear_merged!('rails') end ENV['RAILS_ENV'] = 'test' require './config/environment' - require 'rspec' require 'rspec/expectations' require 'database_cleaner' require 'spinach/capybara' require 'sidekiq/testing/inline' - %w(select2_helper test_env repo_helpers).each do |f| require Rails.root.join('spec', 'support', f) end |