SitePrism 2.4 is out! It contains the following changes:
- It uses #find instead of #first to locate items on a page (this should increase the reliability of your tests) – you don’t need to make any changes, this is an ‘under-the-hood’ fix
- A new #has_no_<element>? method has been added
- Capybara 2.1 is now a dependency
Migrating a Capybara test suite requires a few changes to your code; since SitePrism sits on top of Capybara you’re going to have to make a few tweeks. Fear not, I’ve summarized them here:
In your Gemfile (assuming you use Selenium as your browser driver), add the following line:
- gem ‘selenium-webdriver’
In your Capybara config block (probably in your env.rb file if you’re using cucumber or your spec_helper.rb file if you’re using rspec), add the following lines:
- config.match = :prefer_exact
- config.ignore_hidden_elements = false
The above will replicate the behaviour of Capybara 1.*. If you want more details, take a look at Jonas Nicklas’ post entitled Introducing Capybara 2.1, particularly if you want to replicate Capybara 2.0 behaviour rather than 1.* behaviour.
Enjoy!

