[rspec-users] Spec templates
godfoca at gmail.com
Thu Apr 15 16:39:27 EDT 2010
On Thu, Apr 15, 2010 at 5:32 PM, Phillip Koebbe <phillipkoebbe at gmail.com> wrote:
> David et al,
> Has anyone ever toyed with the idea of templates for specs? I have a
> relative consistent way of specing models, controllers, etc, and invariably,
> I have to delete the stock code that the rspec generator creates and add a
> bunch of stuff that I always want. I was just thinking it would be nice of
> there were a way to have my own template for models, controllers, etc and
> not have to do so much repetitive work for every spec. Maybe it could be as
> easy as having a folder such as
> and in that have
> There would have to be a bit of standardization regarding placeholders in
> those files, but it shouldn't be unbearable, especially considering what it
> could offer.
You could always define your own generators with your own templates.
I'd probably try that first and see how well it works.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users