Refactor capybara spec to use shared_examples