Minitest --name regexp troubles

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

--
Posted via http://www.ruby-forum.com/.

Suraj Kurapati wrote in post #974330:

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?

You have to pass a valid Ruby method name: "/foo_bar_baz/" works.

···

--
Posted via http://www.ruby-forum.com/\.

You have to pass a regular expression that matches a test name you want to run. /foo.bar.baz/ will also work.

···

On Jan 12, 2011, at 15:03, Suraj Kurapati wrote:

Suraj Kurapati wrote in post #974330:

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?

You have to pass a valid Ruby method name: "/foo_bar_baz/" works.