On 9/13/07, Shaker <
flyeminent@...> wrote:
>
> 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!
That's all covered in the assert_select docs. Here's a cheat sheet you
might find useful.
http://labnotes.org/svn/public/ruby/rails_plugins/assert_select/cheat/assert_select.htmlso you can do this:
response.should have_tag("form[action=?][method=post]", foo_path(@foo))
HTH
_______________________________________________
rspec-users mailing list
rspec-users@...
http://rubyforge.org/mailman/listinfo/rspec-users