File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11begin
2- require "bundler/setup"
32 require "bundler/gem_tasks"
43 require "minitest/test_task"
54 require "rdoc/task"
@@ -29,12 +28,18 @@ task default: %i[test rubocop:autocorrect]
2928namespace :test do
3029 desc "Run tests for all supported Rails versions, with current Ruby version"
3130 task :all do
31+ # I _think_ we have to run `bundle exec rake...` here. But that doesn't mean we have
32+ # to run `bundle exec rake...` when we're just running commands in the shell.
33+ # I believe this is because `rake` will load some gems, and the tests, depending on
34+ # the Rails version, may need to load conflicting versions of the gems.
35+ # When you run a single test in the shell, it hasn't had the intermediate `rake` task
36+ # to load gems, so the problem doesn't arise there.
3237 gemfiles . each do |gemfile |
33- system ( "BUNDLE_GEMFILE=#{ gemfile } rake test" )
38+ system ( "BUNDLE_GEMFILE=#{ gemfile } bundle exec rake test" )
3439 end
3540
3641 Dir . chdir ( "demo" )
37- system ( "BUNDLE_GEMFILE= rake test:all" )
42+ system ( "bin/rails test:all" )
3843 end
3944end
4045
You can’t perform that action at this time.
0 commit comments