minitest / minitest-focus

72 stars 9 forks source link

Escape method names in filter regexp #6

Closed ddiachkov closed 10 years ago

ddiachkov commented 10 years ago

Hello. I think method name should be escaped in filter regexp because spec-style specifications may contain non-word characters.

For example:

focus
it "should generate SQL 'subject = ARRAY[value]'"

... will be ignored.

focus
it "should blah-blah ['"

... will raise error

zenspider commented 10 years ago

Cleaner:

>> Regexp.union(["a", "b", "c["])
=> /a|b|c\[/
zenspider commented 10 years ago

I like the extra use of #source.

zenspider commented 10 years ago

Applied. Thanks!