Add a test case for comparing Rails versions

This is the test case that should have accompanied https://github.com/rails/rails/commit/558d402472b49c4c99bf6753d341d7aef2e25dd4