diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..dea28b6 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,22 @@ +PATH + remote: . + specs: + cri (2.4.0) + colored (>= 1.2) + +GEM + remote: https://rubygems.org/ + specs: + colored (1.2) + minitest (5.0.6) + rake (10.1.0) + yard (0.8.7) + +PLATFORMS + ruby + +DEPENDENCIES + cri! + minitest + rake + yard diff --git a/Rakefile b/Rakefile index 7838cf3..83ee166 100644 --- a/Rakefile +++ b/Rakefile @@ -4,6 +4,7 @@ # Rake etc require 'rake' +require 'minitest' require 'minitest/unit' # Cri itself @@ -32,7 +33,7 @@ task :test do $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) - MiniTest::Unit.autorun + MiniTest.autorun require 'test/helper.rb' diff --git a/test/helper.rb b/test/helper.rb index d99520f..0d837d5 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -2,7 +2,7 @@ require 'stringio' -class Cri::TestCase < MiniTest::Unit::TestCase +class Cri::TestCase < Minitest::Test def setup @orig_io = capture_io diff --git a/test/test_command.rb b/test/test_command.rb index 8a2aea4..6e28fdb 100644 --- a/test/test_command.rb +++ b/test/test_command.rb @@ -271,9 +271,9 @@ def test_help_with_optional_options end help = cmd.help - assert_match(help, /--long.*-s/m) - assert_match(help, /^\e\[33m --long \e\[0mlong$/) - assert_match(help, /^\e\[33m -s \e\[0mshort$/) + assert_match(/--long.*-s/m, help) + assert_match(/^\e\[33m --long \e\[0mlong$/, help) + assert_match(/^\e\[33m -s \e\[0mshort$/, help) end def test_modify_with_block_argument