Closed yelvert closed 14 years ago
Let me know if I'm wrong but AFAIK Capybara uses css as the default selector. So this patch seems unnecessary to me.
No, that was what i expected to, but it actually uses XPath as default. Cucumber sets its Capybara to css as well, refer to http://github.com/aslakhellesoy/cucumber-rails/blob/master/templates/install/support/capybara.rb
Apparently this changed some months ago:
http://github.com/jnicklas/capybara/commit/3b0d1d7e364fa4273e15fe0a5e14ab89528ef0d3
So currently (in 0.4.0.rc, which is a pre-release) default_selector is :css. I'm guessing 0.4.0 will be released soon so I don't see the need for patching steak.
Thanks for pointing it out, anyway!
I was unaware that they had changed it in the new version of Capybara, so i guess your right, it would be pointless to patch steak now.
I made Capybara use css selectors by default rather than xpath. Simple 1-line change in the generated acceptance_helper.rb file. I only changed the rails 3 generator as I am unsure if the change would be different for rails 2.