
Emulate rails test methods to allow dirver independence
Reported by gaffo | November 15th, 2008 @ 11:31 PM
So what I mean by this is it would be cool if we could just wrap some of the calls like assert_tag from the rails integration test with webrat methods. It could be either the same api name or it could be a whole new api.
What this would allow is for me to do things in webrat and selenium mode totally agnostic. Eg:
clicks_link("Home") verify_tag(:span, :content => "Hello, Mike!")
Comments and changes to this ticket
-
Bryan Helmkamp November 16th, 2008 @ 01:57 PM
Great idea. I actually spent some time at RubyConf getting this into Webrat.
Checkout the matchers in lib/webrat/core/matchers. They live in the Webrat::Matchers module. They are actually from Merb, and we moved them into Webrat.
The four matchers are:
contain have_selector have_xpath have_tag
have_tag has different semantics than Rails' have_tag, and I'm not recommending it. But if you stick with contain, have_selector and have_xpath, my plan is to make those work with Selenium.
-
Bryan Helmkamp November 16th, 2008 @ 07:41 PM
- State changed from new to resolved
I'm going to close this ticket out in favor of tracking the Selenium support for these methods in #46.
Also, if there are any bugs or feature requests for the new matchers, please don't hesitate to open separate tickets.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Ruby Acceptance Testing for Web applications.