Add testing support for rails4

Based on work done by @adymo in https://github.com/eligoenergy/vanity/commit/ef87cfdfe56640b78b2505a42fc05c8f5205da18, the compatibility for rails4 shouldn't be hard, it seems like making the testing setup work will be harder.