[rspec-devel] [ rspec-Feature Requests-6098 ] Make scaffold_resource generator

noreply at rubyforge.org noreply at rubyforge.org
Thu Nov 9 09:17:54 EST 2006


Feature Requests item #6098, was opened at 2006-10-11 06:01
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6098&group_id=797

Category: rails plugin
Group: None
Status: Open
Priority: 3
Submitted By: Aslak Hellesøy (aslak_hellesoy)
Assigned to: Aslak Hellesøy (aslak_hellesoy)
Summary: Make scaffold_resource generator

Initial Comment:
In the new RESTful Rails it's better to use the scaffold_resource generator. We should support it too.

----------------------------------------------------------------------

>Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2006-11-09 09:17

Message:
I'm attaching a patch with some small improvements: should_eql and correct use of controller_class_name

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2006-11-09 08:41

Message:
Looks like routing is defined in this "patch": http://rubyforge.org/tracker/index.php?func=detail&aid=6471&group_id=797&atid=3152

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2006-11-09 08:34

Message:
I tried this with RSpec's demo app (vendor/rspec_on_rails) - I created an account resource. The following code is failing:

NoMethodError in 'The accountsController should map { :controller => 'accounts', :action => 'show', :id => 1 } to /accounts/1'
undefined method `routing' for #<#<Class:0x2b7260c>:0x3b2d680>

Where is this routing method defined?

----------------------------------------------------------------------

Comment By: Pat Maddox (pergesu)
Date: 2006-11-04 11:49

Message:
My plugin at http://svn.flpr.org/public/plugins/rspec_resource_generator/ handles that.  I removed the forked code, so the only template now is the controller_spec.  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?

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2006-11-04 04:28

Message:
We should *not* fork/copy Rails code. Reuse all the existing templates, swap the test generation with spec generation (our own template). See the implementation of rspec_model and rspec_controller generators.

----------------------------------------------------------------------

Comment By: Jeff Dean (jefdean)
Date: 2006-10-30 03:09

Message:
I've written an rspec_scaffold_resource generator and I'm just waiting to here back on a few questions about directory changes in trunk before submitting the patch - Jeff Dean

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6098&group_id=797


More information about the rspec-devel mailing list