[rspec-users] [PLUGIN] rspec_resource_generator - RESTful scaffold generator with RSpec specifications
dchelimsky at gmail.com
Sun Nov 5 01:45:21 EST 2006
On 11/4/06, aslak hellesoy <aslak.hellesoy at gmail.com> wrote:
> On 11/4/06, Pat Maddox <pergesu at gmail.com> wrote:
> > On 11/4/06, aslak hellesoy <aslak.hellesoy at gmail.com> wrote:
> > > On 11/4/06, Pat Maddox <pergesu at gmail.com> wrote:
> > > > http://svn.flpr.org/public/plugins/rspec_resource_generator/
> > > >
> > > > Most code shamelessly jacked from the scaffold_resource plugin. I
> > >
> > > The generators in Rails *will* evolve and copying/forking its code
> > > will inevitably result in a maintenance nightmare (or obsoletion).
> > >
> > > That's why the existing RSpec generators (rspec_model and
> > > rspec_controller) _reuse_ the templates from Rails instead of forking
> > > them. The only templates we wrote ourselves are the ones that generate
> > > the specs. Maintaining that is easy - it's *our* code.
> > >
> > > Would you consider refactoring your code according to this principle
> > > and delete all the duplicated (copied) code? In that case we'll
> > > include your contribution into RSpec on Rails.
> > >
> > > There is already an RFE for it here:
> > > http://rubyforge.org/tracker/index.php?func=detail&aid=6098&group_id=797&atid=9464
> > All done. The only template remaining is the controller_spec
> > template. Everything else is pulled from the standard Rails
> > generators, and the rspec_model generator for the model spec.
> > Anything else that should be done with that?
> Not that I know of - sounds great! I'll take a look at it tonight.
> Thanks a lot!
Agreed that this is great stuff.
We're about to do a release that has changed some things about which
there seem to be some assumptions in the controller_spec template.
What I'd propose is that we wait until after the release for this. We
can tweak it to fit the newer approaches and then add it to rspec for
the next release.
> > Pat
> > _______________________________________________
> > rspec-users mailing list
> > rspec-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rspec-users
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users