This link explains Firefox browser testing with Capybara: Hope the below link give you an insight of the approach. http://elementalselenium.com/tips/38-headless
Installing xvfb: Example command : For Debian based systems:
apt-get install xvfb
Redhat based systems: yum install xorg-X11-server-Xvfb
Run the script: xvfb-run ruby headless.rb
Executing the script:
Option 1
Start Xvfb on a specific display port and background the process
Tell the terminal session to use the display port
Run the test
Xvfb :99 &
export DISPLAY=:99
ruby headless.rb
Option 2
Simply type the below command
xvfb-run ruby headless.rb
Option 3
Install the headless gem
Update the test setup and teardown to use it
Run the test