To automate browser style testing in Ruby you can use Qt webkit caompatible browser with CapyBara.
When you try to install it you’ll get this error when qmake isn’t found:

An error occurred while installing capybara-webkit (1.1.0), and Bundler cannot
continue.
Make sure that `gem install capybara-webkit -v '1.1.0'` succeeds before
bundling.

To solve this you have to install Qt.

Linux:

sudo apt-get install libqtwebkit-dev

OSX with home brew

brew update
brew install qt

Install capybara:

gem install capybara-webkit -v '1.1.0'