diff --git a/features/support/env.rb b/features/support/env.rb index cc4f56e3..a9e3e6c9 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -4,14 +4,6 @@ # instead of editing this one. Cucumber will automatically load all features/**/*.rb # files. -# test coverage from codeclimate -require "codeclimate-test-reporter" -CodeClimate::TestReporter.start - -# local test coverage -require 'simplecov' -SimpleCov.start 'rails' - require 'cucumber/rails' require 'aruba/cucumber' diff --git a/lib/tasks/continuous_integration.rake b/lib/tasks/continuous_integration.rake index 67b5f161..5a393c11 100644 --- a/lib/tasks/continuous_integration.rake +++ b/lib/tasks/continuous_integration.rake @@ -1 +1,16 @@ -task :ci => ['db:migrate', :test, :cucumber] +task :ci do |t| + ENV['RAILS_ENV'] ||= "test" + + # test coverage from codeclimate + require "codeclimate-test-reporter" + CodeClimate::TestReporter.start + + # local test coverage + require 'simplecov' + SimpleCov.start 'rails' + + [:environment, 'db:migrate', 'test:all', 'cucumber'].each do |t| + print "running '#{t}'\n" + Rake::Task[t].invoke + end +end \ No newline at end of file diff --git a/test/minimal_test_helper.rb b/test/minimal_test_helper.rb index a230f3b0..d1d73ae9 100644 --- a/test/minimal_test_helper.rb +++ b/test/minimal_test_helper.rb @@ -1,12 +1,4 @@ -# test coverage from codeclimate -require "codeclimate-test-reporter" -CodeClimate::TestReporter.start - -# local test coverage -require 'simplecov' -SimpleCov.start 'rails' - -ENV["RAILS_ENV"] = "test" +ENV["RAILS_ENV"] ||= "test" require 'test/unit' require 'mocha/setup' diff --git a/test/test_helper.rb b/test/test_helper.rb index e3ab13cd..22b639f1 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,13 +1,5 @@ ENV["RAILS_ENV"] ||= "test" -# test coverage from codeclimate -require "codeclimate-test-reporter" -CodeClimate::TestReporter.start - -# local test coverage -require 'simplecov' -SimpleCov.start 'rails' - require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help'