run_tests() { if [ "$#" -ne 2 ]; then echo "Usage: run_tests RUBY_VERSION RAILS_VERSION" echo "Example: run_tests 3.0.7 7.1" return 1 fi local ruby="$1" local gemfile="gemfiles/rails_$2.gemfile" echo "**************************************************" echo "Running tests with Ruby $1 and Rails $2..." ASDF_RUBY_VERSION=$ruby BUNDLE_GEMFILE=$gemfile bundle check || ASDF_RUBY_VERSION=$ruby BUNDLE_GEMFILE=$gemfile bundle install && ASDF_RUBY_VERSION=$ruby BUNDLE_GEMFILE=$gemfile bundle exec rake } run_tests "3.0.7" "7.1" run_tests "3.1.6" "7.1" run_tests "3.1.6" "7.2" run_tests "3.2.5" "7.1" run_tests "3.2.5" "7.2" run_tests "3.2.5" "8.0" run_tests "3.3.5" "7.1" run_tests "3.3.5" "7.2" run_tests "3.3.5" "8.0"