Hello,
I’m using Ruby 1.9.2p136 with Minitest 2.0.2 where the --name option
is accepting a partial test name regexp (/foo/) but not a complete
test name regexp (/foo bar baz/), as demonstrated below. Any ideas?
Thanks for your consideration.
#-----------------------------------------------------------------
ruby foo.rb -n ‘/foo/’
#-----------------------------------------------------------------
Loaded suite foo
Started
[“foo”, “bar”, “baz”]
.[“foo”, “bar”, “baz”]
.
Finished in 0.001129 seconds.
2 tests, 2 assertions, 0 failures, 0 errors, 0 skips
Test run options: --seed 12227 --name “/foo/”
#-----------------------------------------------------------------
ruby foo.rb -n ‘/foo bar baz/’
#-----------------------------------------------------------------
Loaded suite foo
Started
Finished in 0.000999 seconds.
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
Test run options: --seed 1434 --name “/foo bar baz/”
#-----------------------------------------------------------------
cat foo.rb
#-----------------------------------------------------------------
require ‘minitest/spec’
require ‘minitest/unit’
MiniTest::Unit.autorun
class CategoryMiniTest < MiniTest::Unit::TestCase
def test_one_two_three
p [1,2,3]
assert_equal(2,2)
end
def test_foo_bar_baz
p %w[foo bar baz]
assert_equal(2,2)
end
end
describe ‘outer’ do
it “one two there” do
p [1,2,3]
assert_equal(2,2)
end
describe ‘inner’ do
it “foo bar baz” do
p %w[foo bar baz]
assert_equal(2,2)
end
end
end