[rspec-devel] [ rspec-Patches-9458 ] The rspec_resource generator does not take into account class nesting
noreply at rubyforge.org
noreply at rubyforge.org
Sun Apr 8 10:50:02 EDT 2007
Patches item #9458, was opened at 2007-03-22 08:49
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=9458&group_id=797
Category: rails plugin
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Steve Tendon (progfrog)
>Assigned to: David Chelimsky (dchelimsky)
Summary: The rspec_resource generator does not take into account class nesting
Initial Comment:
The rspec_resource generator will not generate the correct require paths if you generate with a module.
For example:
./script/generate rspec_resource 'railfrog/content'
will put:
require File.dirname(__FILE__) + '/../spec_helper'
in the generated controller, while it should generate:
require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper'
Similar problems in the generated views.
This patch corrects the genertor templates accordingly.
====
This contribution comes from the Pond http://railfrog.com/
Croak! Croak!
--progfrog
----------------------------------------------------------------------
>Comment By: David Chelimsky (dchelimsky)
Date: 2007-04-08 14:50
Message:
Applied to trunk rev 1728.
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=9458&group_id=797
More information about the rspec-devel
mailing list