diff --git a/faster_path.gemspec b/faster_path.gemspec index a66e525..9616f74 100644 --- a/faster_path.gemspec +++ b/faster_path.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.required_ruby_version = ['>= 2.5', '< 3.0'] spec.add_dependency 'bundler', '>= 1.12' - spec.add_dependency 'rake', '~> 12.3' + spec.add_dependency 'rake', '>= 12.3' spec.add_dependency 'thermite', '0.13.0' spec.add_development_dependency 'read_source', '~> 0.2.6' spec.add_development_dependency 'minitest', '~> 5.11' diff --git a/spec/init.rb b/spec/init.rb index 2c90a17..b5cedfc 100644 --- a/spec/init.rb +++ b/spec/init.rb @@ -1,4 +1,8 @@ ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(__FILE__)) +# Set up the bundle before loading faster_path, which needs rake (through +# thermite): otherwise the newest installed rake gets activated and conflicts +# with the one in Gemfile.lock when mspec is run outside `bundle exec`. +require 'bundler/setup' $LOAD_PATH.unshift File.expand_path('../lib', File.dirname(__FILE__)) require 'faster_path' require 'faster_path/optional/monkeypatches'