[rspec-devel] [ rspec-Bugs-6706 ] controller generator doesn't handle controllers in subdirectories perfectly

noreply at rubyforge.org noreply at rubyforge.org
Thu Nov 16 11:13:45 EST 2006


Bugs item #6706, was opened at 2006-11-16 14:42
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6706&group_id=797

Category: rails plugin
Group: None
>Status: Closed
Resolution: None
Priority: 3
Submitted By: Nobody (None)
>Assigned to: David Chelimsky (dchelimsky)
Summary: controller generator doesn't handle controllers in subdirectories perfectly

Initial Comment:
for example running:
script/generate rspec_controller admin/some_controller

creates the files and folders as you would expect

the only issue is within the generated rb file you get
controller_name :admin/some_controller
which throws an error:

undefined local variable or method `some_controller' for #<Spec::Runner::ContextEvalModule...

The user has to manually alter the call to read something like
controller_name "admin/some_controller"

this is using rspec 0.7.2 and the equivalent rails plugin.. on windows xp
i didn't include an example but if you use the generator to create any controller in a subdir you can easily replicate

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

>Comment By: David Chelimsky (dchelimsky)
Date: 2006-11-16 16:13

Message:
This is already fixed in the trunk and will be released with 0.7.3.

Cheers,
David

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

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


More information about the rspec-devel mailing list