On Sun, Oct 26, 2008 at 11:30 PM, Mark Thomson <[EMAIL PROTECTED]> wrote: > I have an index template that contains a tabulated list of database items, > each of which has an associated "display" link that enables the item to be > displayed via a "show" action. In Cucumber I know how to test that the show > template is rendered when one of those links is clicked using webrat's > "click_link" method and response.should render_template. >
This is a Webrat question - not a Cucumber question. > What I'm not sure about is whether it's possible to specify that a > particular link gets clicked, since there are multiple links on the page > with the same text. I'd like to be able to test that the particular database Use the #clicks_link_within method in Webrat. Aslak > record that gets used in the show template corresponds to the one whose > display link was clicked. > > Any thoughts on this? Is a story-level test the right place to be checking > this, or should it be handled in an object level test? > > Mark. > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users