I noticed that not the exact Bundler version specified in Gemfile.lock is installed, but a newer patch version, if available.
In my case, I am using Bundler 2.2.3, then 2.2.4 is released, installed by setup-ruby, and then Rspec complains because it expects 2.2.3.

I think the fix should be to run gem install bundler -v 2.2.3 instead of gem install bundler -v ~> 2.2.3, so that the exact version is installed.
Happy to submit a PR! 😸
I noticed that not the exact Bundler version specified in Gemfile.lock is installed, but a newer patch version, if available.
In my case, I am using Bundler 2.2.3, then 2.2.4 is released, installed by
setup-ruby, and then Rspec complains because it expects 2.2.3.I think the fix should be to run
gem install bundler -v 2.2.3instead ofgem install bundler -v ~> 2.2.3, so that the exact version is installed.Happy to submit a PR! 😸