#31 √ resolved
Sean Hussey

gsub! in conversion script blows away some test definitions

Reported by Sean Hussey | April 17th, 2008 @ 12:15 PM

This line:

contents.gsub!(/should ".*" do$/) {|line| line.tr!('_', ' ')}

Tends to blow away some test definitions because the entire matching regex is replaced with a space. I think it should look more like this:

contents.gsub!(/\".*_.*\"/) {|line| line.tr!('_', ' ')}

Not pretty, but it captures underscores within the quotes and converts them to spaces. I believe that was the intent. I noticed this on the default test in a new test file:

def test_truth

assert true

end

I'm not yet hip to git, so I'm not attaching/submitting/pushing a patch. If this isn't a huge priority to get fixed, I can give it a shot over the next week.

Comments and changes to this ticket

  • Ryan McGeary

    Ryan McGeary July 30th, 2008 @ 09:04 AM

      • → Assigned user cleared.
      • → Tag changed from “” to “convert_to_should_syntax please_close”

    This should be fixed now thanks to ticket #59.

  • Ryan McGeary

    Ryan McGeary July 30th, 2008 @ 09:07 AM

      • → State changed from “new” to “resolved”
      • → Assigned user changed from “” to “Ryan McGeary”
      • → Tag changed from “convert_to_should_syntax please_close” to “convert_to_should_syntax”

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket