[rspec-users] testing instance variables that are set inside views

David Chelimsky dchelimsky at gmail.com
Sat Jun 30 16:41:09 EDT 2007


On 6/30/07, barsalou <barjunk at attglobal.net> wrote:
> Quoting aslak hellesoy <aslak.hellesoy at gmail.com>:
>
> > @header is an implementation detail of your view that you shouldn't
> > care about in your view spec at all. I recommend you use the have_tag
> > matcher instead to verify what content gets rendered as expected.
> >
> > Aslak
> >
>
> Thanks Aslak, I wondered this myself.  I looked around here :
> http://rspec.rubyforge.org/rdoc/index.html for have_tag but didn't find
> it.
>
> Where would be a good place to find some of these matchers?

have_tag is not part of rspec's core, it's in the rails plugin. The
rdoc for that is at http://rspec.rubyforge.org/rdoc-rails/index.html

Cheers,
David


>
> Mike B.
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list