As I updated my bundle, some capybara have_selector(…) matches started to fail. Here was the message :
From Martin Fowler’s point of view, I must have been a mockist. With using mocks extensively comes quite a few advantages :
I use rspec a lot. I thinks it’s a great testing framework.
Update 06/12/2014: I created a gem for this and other things
After reading The cucumber book I decided to add clever cucumber transforms but steps started to fail all over the place … Even completly unrelated scenarios...
Working with regular expressions is always a try and fail and retry … experience. It really helps to have an interactive tool with which to tune up your expr...
According to stack overflow, simply use something like the following from the chrome console : $x("//img")
Update 05/23/2014: I created a gem for this, read an introduction here