« Return to Thread: Need help in View Spec

Re: Need help in View Spec

by Shaker :: Rate this Message:

Reply to Author | View in Thread

Yes, I have gone through the documentation before, and I read the reference of 'assert_select' as well. But I still can not figure out a way of testing attributes in a tag. What I know is we can use:
  should have_tag("tag#id") or should have_tag("tag.class")
to select a tag, whereas I don't know how to select an attribute and test it!
Another problem is the tag does not have id or class sometimes, does it mean that is no way of selecting it?
David Chelimsky-2 wrote:
On 9/13/07, Shaker <flyeminent@hotmail.com> wrote:
> I can not find much
> information about the "should have_tag" syntax in Rspec.

http://rspec.rubyforge.org/rdoc-rails/classes/Spec/Rails/Matchers.html#M000011
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

 « Return to Thread: Need help in View Spec