lib/testrbl.rb in testrbl-0.1.9 vs lib/testrbl.rb in testrbl-0.1.10
- old
+ new
@@ -61,10 +61,11 @@
if line =~ r
whitespace, method, test_name = $1, $2, $3
regex = Regexp.escape(test_name).gsub("'",".").gsub("\\ "," ").gsub(INTERPOLATION, ".*")
if method == "should"
- regex = "#{method} #{regex}\. $"
+ optional_test_name = "(?:\(.*\))?"
+ regex = "#{method} #{regex}\. #{optional_test_name}$"
elsif method == "test"
# test "xxx -_ yyy"
# test-unit: "test: xxx -_ yyy"
# activesupport: "test_xxx_-__yyy"
regex = "^test(: |_)#{regex.gsub(" ", ".")}$"