Add in Gemfile: group :development, :test do gem 'rspec-rails' gem 'spork-rails' end group :test do gem 'capybara'

To get parent of Capybara's node do the following: node = page.find '#selector' parent = node.find(:xpath, '..') parent_of_parent = node.find...