minitest-rails icon indicating copy to clipboard operation
minitest-rails copied to clipboard

test not using Minitest::Spec as ancestor is missing described names in test filtering

Open grosser opened this issue 1 year ago • 0 comments

before matching Minitest::Spec:

describe "bar" do
  it "baz" do
    puts 1
  end
end

run via ruby -n bar_test.rb 'bar#test_0001_baz'

after matching ActiveSupport::TestCase:

describe "bar", :model do
  it "baz" do
    puts 1
  end
end

ruby bar_test.rb -v says the name is bar::model#test_0001_baz but running ruby bar_test.rb -n 'bar::model#test_0001_baz' does not work only ruby bar_test.rb -n 'test_0001_baz' does this breaks running tests by line via minitest-line because it correctly uses bar::model#test_0001_baz

also tried Minitest::Spec::DSL::TYPES[0] = [//, ActiveSupport::TestCase] and it has the same effect, the describe part is gone

grosser avatar Sep 28 '24 16:09 grosser