[rspec-devel] [ rspec-Patches-11921 ] Adds the correct controller_name from derived_controller_name() to the ViewExampleController

noreply at rubyforge.org noreply at rubyforge.org
Fri Jun 29 10:31:43 EDT 2007


Patches item #11921, was opened at 2007-06-29 10:41
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=11921&group_id=797

Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Eloy Duran (alloy)
Assigned to: Nobody (None)
Summary: Adds the correct controller_name from derived_controller_name() to the ViewExampleController

Initial Comment:
Only the controller_path is being set on an instantiated ViewExampleController, in my case (working with Hobo) I needed the controller_name to return the derived_controller_name too.
Unfortunately I was unable to locate the specs for the ViewExampleController, did I miss it?

Cheers,
Eloy

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

>Comment By: Eloy Duran (alloy)
Date: 2007-06-29 14:31

Message:
Unfortunately I don't have the time atm to write examples for the complete 
ViewExampleController, but I've added 2 to the view_spec_spec.rb file.
I'm not 100% sure about the reference to @controller, is there a better way?
I created a folder called foo (I'll attach a zip) in: 
spec_resources/views/view_spec/
I did this to be able to really test controller_path and controller_name.

Cheers,
Eloy

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

Comment By: David Chelimsky (dchelimsky)
Date: 2007-06-29 12:19

Message:
ViewExampleController is not described directly it seems, but what is in there was driven by view_spec_spec.rb. If you want to add more granular examples for the ViewExampleController, that would be great. Otherwise, you can simply add an example in view_spec_spec.rb that uses controller_name to drive the implementation.

Cheers,
David

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

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


More information about the rspec-devel mailing list