On 29 Dec 2010, at 06:14, Shea Levy wrote:
> Hi all,
>
> Suppose I have a table that lists all of my products, that includes a a
> <th>Description</th> somewhere in the first <tr>, and each product has its
> data held within a <tr id="product<%= product.id %>">. After updating a
> product's description, I want to write something like:
>
> within "tr#category#{category.id}" do
> under_header "Description" do |scope|
> scope.contains "New Description"
> end
> end
>
> in a Cucumber/webrat feature definition or
>
> response.should have_tag("tr#category1") do
> under_header "Description" do
> text => "Howdy
> end
> end
>
> in an RSpec spec. Is there anything like this available, any way to search
> within a specific table column by specifying the header?
>
> Cheers,
> Shea
>
>
It's worth looking at the tableish method that cucumber-rails provides. You can
use it to turn a HTML table element into an array. You can even diff it against
a Cucumber::Ast::Table object.
cheers,
Matt
[email protected]
07974 430184
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users