[ADV] assert_select in the latest beta of AWDwR

Folks:

I’ve had a really fun day: a root canal this morning, and documenting
the new assert_select method for functional and integration testing
this afternoon.

If you’d like to know how

 assert_select "div#cart" do
   assert_select "table" do
     assert_select "tr", :count => 3
     assert_select "tr.total-line td:last-of-type", "$57.70"
   end
 end

validates that our page contains a

with a three row
table, where the last in the with class=“total-line” has
the content $57.70, then download the latest beta and search for
assert_select in the Testing chapter.

Cheers

Dave

URLS:

refresh existing book: Pragmatic Bookshelf: By Developers, For Developers

book information: http://pragmaticprogrammer.com/titles/rails