#329 √ resolved
Michael Holub

with_tag matches tags in the whole document

Reported by Michael Holub | May 17th, 2008 @ 09:38 PM | in 1.0 Final

@body.should have_tag(:div, :id => "post_#{post.id}",

:class => :post).with_tag(:p, :class => :body) do |p|

p.should contain post.body

end

When I try to use with_tag, it doesn't matches in tag, that matched by have_tag, but the whole document.

render: http://pastie.org/198814

spec: http://pastie.org/198813

message:

  • should have the contents of each post inside a div with an id and class (FAILED - 1)

1)

'posts/index should have the contents of each post inside a div with an id and class' FAILED

expected the following element's content to include "Merb":

Rocks!

./spec/views/posts/index_spec.rb:28:

./spec/views/posts/index_spec.rb:26:

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Attachments

Tags