Update fakefs
to fix test failures on Ruby 3.2.2
#21588
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validci/circleci
builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
We kept having
NameError: undefined method `=~' for class `FakeFS::Pathname'
errors when running the tests (bundle exec rspec
) in Ruby 3.2.2 on our Macs.Description
Updating
fakefs
fixed those failures that happened runningbundle exec rspec
on the repo in Ruby 3.2.2.Initially I updated
fakefs
to its latest~> 1.x
version, which was1.9
. But then I later noticed (thanks, CI) thatfakefs 1.9
requires Ruby>= 2.7
, while fastlane still supports Ruby2.6
(spec.required_ruby_version = '>= 2.6'
), so I ended up forcing usingfakefs 1.8
, which is the latest version of that gem that supports Ruby 2.6 (>=2.4).PS: At some point we probably want to add Ruby 3.2.2 to our array of Ruby versions tested by CI, but that's improvements for another PR (I think @rogerluan already tried a while ago and encountered some hiccups while trying so paused his work on this?)
Testing Steps
Run:
And ensure that you don't get errors related to
FakeFS::Pathname
like the ones below (that we had before the update):