[rspec-devel] [ rspec-Bugs-11628 ] error mocking partial page variable only after partial has already been rendered

noreply at rubyforge.org noreply at rubyforge.org
Mon Jul 2 05:52:17 EDT 2007


Bugs item #11628, was opened at 2007-06-17 10:22
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11628&group_id=797

Category: rails plugin
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 3
Submitted By: David Chelimsky (dchelimsky)
>Assigned to: David Chelimsky (dchelimsky)
Summary: error mocking partial page variable only after partial has already been rendered

Initial Comment:
Steps to reproduce:

Apply the attached patch (which adds an example file w/ 2 examples)
cd example_rails_app
rake rspec:install_plugin
script/spec spec/views/person/_person.rhtml_spec.rb

You should see an error. If, however, you apply --reverse, you should not:

script/spec spec/views/person/_person.rhtml_spec.rb --reverse


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

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-07-02 09:52

Message:
The solution to this is to NOT do this. Instead, we've added template.expects_render for view examples and controller.expects_render for controller examples.

Docs have been appropriately updated as of r2153.

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

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


More information about the rspec-devel mailing list