提交 7fcf6d64 编写于 作者: M Mislav Marohnić

Switch to minitest for consistent output between Ruby versions

In Ruby 2.0, `test/unit` activates a fancy output style for terminals
that doesn't look well in Travis logs. I could disable it with the
`--jobs-status=normal` test optiont, but that option isn't supported in
Ruby 1.8.7.

Instead of dealing with inconsistencies between test support in
different Ruby versions, I'm simply switching to a fixed version of
Minitest.
上级 92de1abf
source 'https://rubygems.org' source 'https://rubygems.org'
gem 'minitest'
gem 'ronn', :platform => :mri gem 'ronn', :platform => :mri
gem 'aruba', '~> 0.5.3' gem 'aruba', '~> 0.5.3'
gem 'cucumber', '~> 1.2.1' gem 'cucumber', '~> 1.2.1'
......
...@@ -33,6 +33,7 @@ GEM ...@@ -33,6 +33,7 @@ GEM
bouncy-castle-java (>= 1.5.0146.1) bouncy-castle-java (>= 1.5.0146.1)
json (1.8.0) json (1.8.0)
json (1.8.0-java) json (1.8.0-java)
minitest (5.0.5)
multi_json (1.7.7) multi_json (1.7.7)
mustache (0.99.4) mustache (0.99.4)
rack (1.4.1) rack (1.4.1)
...@@ -65,6 +66,7 @@ DEPENDENCIES ...@@ -65,6 +66,7 @@ DEPENDENCIES
hub! hub!
jruby-openssl jruby-openssl
json json
minitest
rake rake
ronn ronn
sinatra sinatra
......
...@@ -31,9 +31,7 @@ task :default => [:test, :features] ...@@ -31,9 +31,7 @@ task :default => [:test, :features]
Rake::TestTask.new do |t| Rake::TestTask.new do |t|
t.libs << 'test' t.libs << 'test'
t.ruby_opts << '-rubygems'
t.pattern = 'test/**/*_test.rb' t.pattern = 'test/**/*_test.rb'
t.verbose = false
end end
task :features do task :features do
......
require 'helper' require 'helper'
class ContextTest < Test::Unit::TestCase class ContextTest < Minitest::Test
class Context class Context
include Hub::Context include Hub::Context
......
require 'test/unit' require 'minitest/autorun'
require 'hub' require 'hub'
# We're checking for `open` in our tests # We're checking for `open` in our tests
...@@ -28,7 +28,7 @@ Hub::Commands.extend Module.new { ...@@ -28,7 +28,7 @@ Hub::Commands.extend Module.new {
end end
} }
class Test::Unit::TestCase class Minitest::Test
# Shortcut for creating a `Hub` instance. Pass it what you would # Shortcut for creating a `Hub` instance. Pass it what you would
# normally pass `hub` on the command line, e.g. # normally pass `hub` on the command line, e.g.
# #
......
require 'helper' require 'helper'
require 'webmock/test_unit' require 'webmock/minitest'
require 'rbconfig' require 'rbconfig'
require 'yaml' require 'yaml'
require 'forwardable' require 'forwardable'
...@@ -19,7 +19,7 @@ WebMock::BodyPattern.class_eval do ...@@ -19,7 +19,7 @@ WebMock::BodyPattern.class_eval do
end end
end end
class HubTest < Test::Unit::TestCase class HubTest < Minitest::Test
extend Forwardable extend Forwardable
if defined? WebMock::API if defined? WebMock::API
......
...@@ -3,7 +3,7 @@ require 'hub/standalone' ...@@ -3,7 +3,7 @@ require 'hub/standalone'
require 'fileutils' require 'fileutils'
require 'stringio' require 'stringio'
class StandaloneTest < Test::Unit::TestCase class StandaloneTest < Minitest::Test
include FileUtils include FileUtils
def setup def setup
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册