This project is archived and is in readonly mode.

Test Coverage and refactor of Template Runner
Reported by Aaron Quint | December 23rd, 2008 @ 02:30 AM | in 2.x
Hey Team
When wanting to add some additional features to Rails new Template Runner, I noticed it has 0 test coverage. (See #1613)
Attached is a patch to add a full test suite as well as some small refactoring for repetitive methods.
Its split into a couple of commits, I also forked and have branch of all the commits. See: http://github.com/quirkey/rails/...
I hope this helps and makes this feature easier to expand in the future.
Thanks! --AQ
Comments and changes to this ticket
- 
         Pratik December 23rd, 2008 @ 03:16 AMI apply the patch and generate() stops working :) Also, could you please rebase this as a single patch ? Thanks. 
- 
            
         Aaron Quint December 23rd, 2008 @ 05:23 AMSorry about that - had to discover the wonders of git rebase --interactive. Attached is a consolidated patch with the generator issue fixed. I tried it with all of Jeremy's templates: http://github.com/jeremymcanally... Happy Holidays! 
- 
            
         Jeremy McAnally December 26th, 2008 @ 07:55 PMLooks great. Thanks for making the code as pretty as I wanted it to be originally. :P I'll probably pull your tests, etc. back into the rg gem so pre-2.3 people can use them. 
- 
            
         
- 
         Repository December 27th, 2008 @ 09:05 PM- State changed from new to resolved
 (from [9fd35fc2d892393386ca9f522d25ba0bcb9c6764]) Adding test coverage and better logging to Rails::TemplateRunner [#1618 state:resolved] Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co... 
- 
            
         Aaron Quint December 28th, 2008 @ 04:34 AMHey Pratik Sorry about that, but it looks like the new logging broke the rake rails:template task. Attached is a patch to fix it. Thanks! Let me know if you want me to put it in a new ticket. --AQ 
- 
         Repository December 28th, 2008 @ 04:49 PM(from [c0c79f779c990f9e53c9b600291801fdf0bbe56b]) Use SimpleLogger for Rails::TemplateRunner outside of the Generator context [#1618 state:resolved] Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co... 
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 
         1613 
          Adding #environment to new template_runner
        I am a man of my word - I wrote a full test suite that
en... 1613 
          Adding #environment to new template_runner
        I am a man of my word - I wrote a full test suite that
en...
- 
         1638 
          TemplateRunner.lib should have a &block parameter
        Just found this bug is already fixed by patch in ticket #... 1638 
          TemplateRunner.lib should have a &block parameter
        Just found this bug is already fixed by patch in ticket #...
- 
         1618 
          Test Coverage and refactor of Template Runner
        (from [9fd35fc2d892393386ca9f522d25ba0bcb9c6764]) Adding ... 1618 
          Test Coverage and refactor of Template Runner
        (from [9fd35fc2d892393386ca9f522d25ba0bcb9c6764]) Adding ...
- 
         1618 
          Test Coverage and refactor of Template Runner
        (from [c0c79f779c990f9e53c9b600291801fdf0bbe56b]) Use
Sim... 1618 
          Test Coverage and refactor of Template Runner
        (from [c0c79f779c990f9e53c9b600291801fdf0bbe56b]) Use
Sim...
 Aaron Quint
      Aaron Quint
 Cristi Balan
      Cristi Balan
 Pratik
      Pratik