Unable to run single test with spaces in name using MiniTest

using RubyMine 4.5.4 with following gems

group :test do
  gem 'minitest'
  gem 'minitest-rails'
  gem "minitest-reporters", '>= 0.8.0'

With a simple test file like

require 'minitest_helper'

describe Array do
  it "test1" do
    Array.new.must_be_instance_of Array

  it "my test" do
    Array.new.must_be_instance_of Array

I can right-click to run the "test1" test without issue. But attempting to run only the second "my test" test results in:

Run options: --name=/test_\d+_my_test/ --seed 46030

# Running tests:

Finished tests in 0.031320s, 0.0000 tests/s, 0.0000 assertions/s.

0 tests, 0 assertions, 0 failures, 0 errors, 0 skips

Process finished with exit code 0

The issue seems to be that the regular expression passed to the name parameter is assuming that the space in "my test" has been replaced with an underscore when in fact it is not. I can modify the configuration to change the test name filter to something like "/test_\d+_my test/" to fix that configuration but it's pretty annoying.

Is there anyway to change how RubyMine generates this regular expression?
1 comment
Comment actions Permalink


it looks like a bug for me, could you please file a ticket about it in our tacker (http://youtrack.jetbrains.com/issues/RUBY)

Thanks in advance, Oleg.


Please sign in to leave a comment.