/
test_helper.rb
36 lines (32 loc) · 1.57 KB
/
test_helper.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
require 'bundler/setup'
require 'minitest/autorun'
require 'mocha'
require 'test_declarative'
require 'minitest/reporters'
module MiniTestReportersTest
require File.expand_path('../support/test_case', __FILE__)
module Fixtures
require File.expand_path('../support/fixtures/test_case_fixture', __FILE__)
require File.expand_path('../support/fixtures/empty_test_fixture', __FILE__)
require File.expand_path('../support/fixtures/error_test_fixture', __FILE__)
require File.expand_path('../support/fixtures/failure_test_fixture', __FILE__)
require File.expand_path('../support/fixtures/pass_test_fixture', __FILE__)
require File.expand_path('../support/fixtures/skip_test_fixture', __FILE__)
require File.expand_path('../support/fixtures/suite_callback_test_fixture', __FILE__)
end
end
MiniTest::Unit.runner = MiniTest::SuiteRunner.new
# Testing the built-in reporters using automated unit testing would be extremely
# brittle. Consequently, there are no unit tests for them. Instead, uncomment
# the reporter that you'd like to test and run the full test suite. Make sure to
# try them with skipped, failing, and error tests as well!
#
# Personally, I like the progress reporter. Make sure you don't change that line
# when you commit.
if ENV['TM_PID']
MiniTest::Unit.runner.reporters << MiniTest::Reporters::RubyMateReporter.new
else
# MiniTest::Unit.runner.reporters << MiniTest::Reporters::DefaultReporter.new
# MiniTest::Unit.runner.reporters << MiniTest::Reporters::SpecReporter.new
MiniTest::Unit.runner.reporters << MiniTest::Reporters::ProgressReporter.new
end