Since we support versions of Rails from 4 onwards, and we now have many version-specific patches, it would be nice to have an easy way to run specs on all supported versions to verify new changes.
This PR adds a rake task, test:all, which iterates through a collection of Gemfiles and run the specs.
The organization of the Gemfiles is inspired by devise, which takes a similar approach to managing different Rails versions.
🎬 Here it is in action:
$ rake test:all 2> /dev/null
Running specs for Gemfile.rails-5.0-stable
............................
Finished in 0.19595 seconds (files took 0.52644 seconds to load)
28 examples, 0 failures
Running specs for Gemfile.rails-5.2-stable
............................
Finished in 0.2064 seconds (files took 0.55434 seconds to load)
28 examples, 0 failures
Running specs for Gemfile.rails-4.2-stable
............................
Finished in 0.19892 seconds (files took 0.42005 seconds to load)
28 examples, 0 failures
Running specs for Gemfile.rails-5.1-stable
............................
Finished in 0.2044 seconds (files took 0.52197 seconds to load)
28 examples, 0 failures
Since we support versions of Rails from 4 onwards, and we now have many version-specific patches, it would be nice to have an easy way to run specs on all supported versions to verify new changes.
This PR adds a rake task,
test:all
, which iterates through a collection of Gemfiles and run the specs.The organization of the Gemfiles is inspired by devise, which takes a similar approach to managing different Rails versions.
🎬 Here it is in action: