From 6e6793d8ff1ad4160333b604f0d84a7e99def78e Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Sat, 11 Apr 2015 18:19:35 -0300 Subject: [PATCH] rails4: only load minitest on test and use minitest-reporters --- Gemfile | 3 ++- test/test_helper.rb | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 7c6d2e4..4a8dff6 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,5 @@ source "https://rubygems.org" gem 'rails', '~> 4.2.0' -gem 'minitest' gem 'fast_gettext', '~> 0.6.8' gem 'acts-as-taggable-on', '~> 3.4.2' gem 'rails_autolink', '~> 1.1.5' @@ -48,6 +47,8 @@ group :test do gem 'rspec-rails', '~> 2.14.1' gem 'mocha', '~> 1.1.0', :require => false gem 'test-unit' if RUBY_VERSION >= '2.2.0' + gem 'minitest' + gem 'minitest-reporters' end group :cucumber do diff --git a/test/test_helper.rb b/test/test_helper.rb index b13a823..041e352 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -2,9 +2,13 @@ ENV["RAILS_ENV"] = "test" require_relative "../config/environment" require 'rails/test_help' + require 'mocha' require 'mocha/mini_test' +require "minitest/reporters" +Minitest::Reporters.use! Minitest::Reporters::ProgressReporter.new, ENV, Minitest.backtrace_filter + require 'authenticated_test_helper' require_relative 'factories' require_relative 'noosfero_doc_test' @@ -145,7 +149,7 @@ class ActiveSupport::TestCase a = a.to_sym next unless options[:attributes].has_key? a attributes[a] = v.value - end + end if options[:attributes].present? ret = true ret &&= options[:attributes].blank? || attributes == options[:attributes] -- libgit2 0.21.2