[rspec-users] View Specs Fail with "protected method render"

Jeff Dean jeff at jefdean.com
Fri Apr 20 01:56:11 EDT 2007


Thanks dan - I'll check out to at least that revision and see what I get.

On 4/20/07, Daniel Manges <daniel.manges at gmail.com> wrote:
>
> I think this was fixed in r1594: http://rubyforge.org/tracker/index.php?func=detail&aid=9232&group_id=797&atid=3151
>
>
> Dan Manges
>
>
> On 4/18/07, Jeff Dean <jeff at jefdean.com> wrote:
> >
> >
> > zentest -v = zentest v3.4.3
> > spec -v = RSpec-0.8.2 (r1560) - BDD for Ruby
> > spec_on_rails is a checkout of REL_0_8_2
> >
> >
> > aslak hellesoy wrote:
> > >
> > > On 4/11/07, Jeff Dean < jeff at jefdean.com> wrote:
> > >> I've got rspec and zentest installed as well as the rspec rails
> > plugin,
> > >> and
> > >> my model/controller specs all pass and work well.  I can't seem to
> > get
> > >> views
> > >> to work though - 100% of the specs fail with:
> > >>
> > >> NoMethodError in '/users/show.rhtml should render attributes in <p>'
> > >> protected method `render' called for
> > >> #<Spec::Rails::Runner::ViewSpecController:0x3197dfc>
> > >>
> > /Users/jeff/Sites/niche/trunk/vendor/plugins/rspec_on_rails/lib/spec/rails/runner/context/view.rb:102:in
> > >> `render'
> > >> ./spec/views/users/show_rhtml_spec.rb:13:
> > >>
> > >> Note the "protected method `render' called for
> > >> #<Spec::Rails::Runner::ViewSpecController:0x3197dfc>"
> > >>
> > >> Here's an example spec:
> > >>
> > >> require File.dirname(__FILE__) + '/../../spec_helper'
> > >>
> > >> context "/users/new.rhtml" do
> > >>   include UsersHelper
> > >>
> > >>   setup do
> > >>     @errors = mock("errors")
> > >>     @errors.stub!(:count).and_return(0)
> > >>
> > >>     @user = mock_user
> > >>     @user.stub!(:errors).and_return @errors
> > >>     assigns[:user] = @user
> > >>   end
> > >>
> > >>   specify "should render new form" do
> > >>     render "/users/new.rhtml"
> > >>     response.should_have_tag 'form', :attributes =>{:action =>
> > >> users_path,
> > >> :method => 'post'}
> > >>
> > >>   end
> > >> end
> > >>
> > >> Can anyone think of why "render" is protected?  Is this a versioning
> > >> issue?
> > >>
> > >
> > > What versions of everything do you have?
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/View-Specs-Fail-with-%22protected-method-render%22-tf3566514.html#a10066654
> > Sent from the rspec-users mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > rspec-users mailing list
> > rspec-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rspec-users
> >
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070420/df5d1ddc/attachment-0001.html 


More information about the rspec-users mailing list