Update how Rails.version is checked
Extracts version checking and adds specs

[Closes #727]
Merge branch 'change-rails-version-checker'