I have an app that displays some content and then selects a random record and shows it
How do I test for this?
Then /^I Should see the associated "([^']*)" "([^']*)"$/ do |type, elements|
elements.split(', ').each do |element|
page.should have_content element
end
end
obviously fails as it doesn’t find every record. How do I validate the presence of only one record??
Thanks
Use the following: