[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 09:42:29 EST 2006


Bugs item #6706, was opened at 2006-11-16 09: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: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
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

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

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