Ruby on Rails
Friday, December 5, 2014
Hello,
I want to test the contents of the p tag here :
~~~
<div class="productinfo text-center">
<%= image_tag product.image_url %>
<h2><%=number_to_currency(product.price)%></h2>
<p> <%= product.title %> </p>
<a href="#" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</a>
</div>
<%= image_tag product.image_url %>
<h2><%=number_to_currency(product.price)%></h2>
<p> <%= product.title %> </p>
<a href="#" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</a>
</div>
~~~
I tried this assert_select'.single-products.p',1 but it do not work. I get 0 items found .
Roelof
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0b6f796a-2967-4a4f-b0c5-64fc4f8527a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment