[rspec-users] Just upgraded to 1.0.0, should render_text isn't working for me

Pat Maddox pergesu at gmail.com
Mon May 21 14:31:55 EDT 2007


On 5/21/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> On 5/20/07, Pat Maddox <pergesu at gmail.com> wrote:
> > I finally got around to upgrading from 0.8.2 (!!).  I had a spec which
> > looked like
> >
> > specify "should render abc123" do
> >   controller.should_render :text => "abc123"
> >   get :key
> > end
> >
> > With 1.0.0, the new spec is
> >
> > it "should render abc123" do
> >   get :key
> >   response.should render_text("abc123")
> > end
> >
> > However it doesn't work, giving me the error:
> > undefined method `render_text' for #<#<Class:0x32ebdac>:0x381a454>
>
> Try have_text instead of render_text.

Alright, that worked.  The docs at
http://rspec.rubyforge.org/documentation/rails/writing/controllers.html
reference render_text.

It seems like a lot of the docs may be out of date...I'm unable to
convert my helper specs at this point.
http://rspec.rubyforge.org/documentation/rails/writing/helpers.html
shows one example using helper_name and one without it.  Unfortunately
if I don't use helper_name it says that my helper methods aren't
defined, but if I use helper_name then it turns out helper_name itself
isn't defined.

If you could help me get these issues sorted out I'd be more than
happy to update the docs accordingly.

Pat


More information about the rspec-users mailing list