I want to verify the href is correct:
<p class="website">
<a href="http://www.com.com">Website</a>
</p>
my step in the cucumber file:
And the "website" class should have "www.happyhour.com"
the step definition:
Then /^the "([^\"]*)" class should have "([^\"]*)"$/ do |link, url|
response.should have_selector(".#{link}") do |site|
site.inner_html.include?(url).should be_true
end
end
it's doesn't look good and would like to hear suggestion for improving
it.
Thanks!
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users