Add test suite converted to rspec (Extracted from #521)

Converted the test suite to rspec, so it now builds across the latest versions of Rails and various versions of Ruby without conflicts. Meant to go with #525.

Add common gemfile which other gemfiles include.