@@ -595,7 +595,7 @@ class PostTest < ActiveSupport::TestCase
595
595
assert true
596
596
end
597
597
598
- test "foo again" do
598
+ test "foo + + again" do
599
599
puts "hello again"
600
600
assert true
601
601
end
@@ -611,7 +611,7 @@ class PostTest < ActiveSupport::TestCase
611
611
assert_match "1 runs, 1 assertions, 0 failures" , output
612
612
end
613
613
614
- run_test_command ( "test/models/post_test.rb -n 'foo again'" ) . tap do |output |
614
+ run_test_command ( "test/models/post_test.rb -n 'foo + + again'" ) . tap do |output |
615
615
assert_match "hello again" , output
616
616
assert_match "1 runs, 1 assertions, 0 failures" , output
617
617
end
@@ -632,7 +632,7 @@ class PostTest < ActiveSupport::TestCase
632
632
assert true
633
633
end
634
634
635
- test "greets bar" do
635
+ test "greets + + bar" do
636
636
puts "hello bar"
637
637
assert true
638
638
end
@@ -643,7 +643,41 @@ class PostTest < ActiveSupport::TestCase
643
643
end
644
644
RUBY
645
645
646
- run_test_command ( "test/models/post_test.rb -n '/greets foo|greets bar/'" ) . tap do |output |
646
+ run_test_command ( "test/models/post_test.rb -n '/greets foo|greets . . bar/'" ) . tap do |output |
647
+ assert_match "hello foo" , output
648
+ assert_match "hello again foo" , output
649
+ assert_match "hello bar" , output
650
+ assert_match "3 runs, 3 assertions, 0 failures" , output
651
+ end
652
+ end
653
+
654
+ def test_declarative_style_regexp_filter_with_minitest_spec
655
+ app_file "test/models/post_test.rb" , <<~RUBY
656
+ require "minitest/spec"
657
+
658
+ class PostTest < Minitest::Spec
659
+ it "greets foo" do
660
+ puts "hello foo"
661
+ assert true
662
+ end
663
+
664
+ it "greets foo again" do
665
+ puts "hello again foo"
666
+ assert true
667
+ end
668
+
669
+ it "greets + + bar" do
670
+ puts "hello bar"
671
+ assert true
672
+ end
673
+
674
+ it "greets no one" do
675
+ assert false
676
+ end
677
+ end
678
+ RUBY
679
+
680
+ run_test_command ( "test/models/post_test.rb -n '/greets foo|greets . . bar/'" ) . tap do |output |
647
681
assert_match "hello foo" , output
648
682
assert_match "hello again foo" , output
649
683
assert_match "hello bar" , output
0 commit comments