When applying Rails upgrades on WiseCash, I want to make sure I review the commits to spot potential regressions. This RSpec spec warns me when I'm upgrading at any time (even tired, where you might forgot to do so).
Last active
December 31, 2015 03:29
-
-
Save thbar/7927843 to your computer and use it in GitHub Desktop.
Get an error to make sure you review Rails changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe 'Upgrading' do | |
let(:verified_version) { '3.2.15' } | |
let(:current_version) { Rails::VERSION::STRING } | |
it 'warns us when upgrading Rails' do | |
if current_version != verified_version | |
url = "https://github.com/rails/rails/compare/v#{verified_version}...v#{current_version}" | |
fail "Upgrading Rails! Please review the changes first - #{url}" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment