focus doesn't focus when `it` block has asterisks in it
martco opened this issue · 4 comments
focus
it "will be focused" { }
focus
it "will *not* be focused" { }
Same is true for parens.
I'm pretty sure I've got this one figured out, working on a PR now.
So I thought I had this figured out, but now I'm a bit lost.
There is a line in focus5.rb
like this:
@@filtered_names << "#{self}##{name}"
and changing it to this fixes my use case (parens in the test name):
@@filtered_names << Regexp.escape("#{self}##{name}")
However that breaks the minitest-focus tests. In apprears that in the local test suite, asterisks and parenthesis are handled correctly, however they don't run for me. I am running my test file in Rails using guard-minitest
. It almost seems like that in that environment the Regex needs to be double escaped, but I don't know why.
This is all the time I have on this for now. I'm just removing the parens from the it
name to get past it for today. Anyone else have any ideas why this would fail in a Guard/Rails environment?
This has been fixed since 1.1.1 / 2015-03-12
. Closing.