Skip to content

Commit b306e97

Browse files
authored
Merge pull request #957 from nobu/test
Fix fragile tests
2 parents 551b5d9 + 5f46479 commit b306e97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/rdoc/test_rdoc_ri_driver.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ def test_display_class
598598
assert_match %r%^= Attributes:%, out
599599
assert_match %r%^ attr_accessor attr%, out
600600

601-
assert_equal 1, out.scan(/-\n/).length
601+
assert_equal 1, out.scan(/^-{50,}$/).length, out
602602

603603
refute_match %r%Foo::Bar#blah%, out
604604
end
@@ -622,7 +622,7 @@ def test_display_class_all
622622
assert_match %r%^= Attributes:%, out
623623
assert_match %r%^ attr_accessor attr%, out
624624

625-
assert_equal 6, out.scan(/-\n/).length
625+
assert_equal 6, out.scan(/^-{50,}$/).length, out
626626

627627
assert_match %r%Foo::Bar#blah%, out
628628
end

0 commit comments

Comments
 (0)