[rspec-devel] [ rspec-Bugs-12427 ] ViewExampleController does not extend ApplicationController

noreply at rubyforge.org noreply at rubyforge.org
Thu Jul 19 23:36:00 EDT 2007


Bugs item #12427, was opened at 2007-07-19 23:26
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=12427&group_id=797

Category: rails plugin
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 3
Submitted By: Brian Takita (btakita)
>Assigned to: David Chelimsky (dchelimsky)
Summary: ViewExampleController does not extend ApplicationController

Initial Comment:
This causes breakages when TheController.helper_method is used.

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

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-07-20 03:36

Message:
As designed:

I very deliberately chose not to derive from ApplicationController because I didn't want any coupling between the views and any other application code, including helper methods that might break.

If you want SomeController.helper_method in view examples, you have to mock or stub it. If you want to couple the views to the controllers (so you don't have to mock these methods), you can do that by writing controller examples with integrated views.

If you have another suggestion as to how to approach this, feel free, but I'm closing this now as "as designed."

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

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


More information about the rspec-devel mailing list