Commit 6e6793d8ff1ad4160333b604f0d84a7e99def78e
1 parent
a3c6b602
Exists in
master
and in
20 other branches
rails4: only load minitest on test and use minitest-reporters
Showing
2 changed files
with
7 additions
and
2 deletions
Show diff stats
Gemfile
1 | 1 | source "https://rubygems.org" |
2 | 2 | gem 'rails', '~> 4.2.0' |
3 | -gem 'minitest' | |
4 | 3 | gem 'fast_gettext', '~> 0.6.8' |
5 | 4 | gem 'acts-as-taggable-on', '~> 3.4.2' |
6 | 5 | gem 'rails_autolink', '~> 1.1.5' |
... | ... | @@ -48,6 +47,8 @@ group :test do |
48 | 47 | gem 'rspec-rails', '~> 2.14.1' |
49 | 48 | gem 'mocha', '~> 1.1.0', :require => false |
50 | 49 | gem 'test-unit' if RUBY_VERSION >= '2.2.0' |
50 | + gem 'minitest' | |
51 | + gem 'minitest-reporters' | |
51 | 52 | end |
52 | 53 | |
53 | 54 | group :cucumber do | ... | ... |
test/test_helper.rb
... | ... | @@ -2,9 +2,13 @@ ENV["RAILS_ENV"] = "test" |
2 | 2 | |
3 | 3 | require_relative "../config/environment" |
4 | 4 | require 'rails/test_help' |
5 | + | |
5 | 6 | require 'mocha' |
6 | 7 | require 'mocha/mini_test' |
7 | 8 | |
9 | +require "minitest/reporters" | |
10 | +Minitest::Reporters.use! Minitest::Reporters::ProgressReporter.new, ENV, Minitest.backtrace_filter | |
11 | + | |
8 | 12 | require 'authenticated_test_helper' |
9 | 13 | require_relative 'factories' |
10 | 14 | require_relative 'noosfero_doc_test' |
... | ... | @@ -145,7 +149,7 @@ class ActiveSupport::TestCase |
145 | 149 | a = a.to_sym |
146 | 150 | next unless options[:attributes].has_key? a |
147 | 151 | attributes[a] = v.value |
148 | - end | |
152 | + end if options[:attributes].present? | |
149 | 153 | |
150 | 154 | ret = true |
151 | 155 | ret &&= options[:attributes].blank? || attributes == options[:attributes] | ... | ... |