Skip to content

Commit

Permalink
Improve Rakefile to point out what needs to be done for tests to pass…
Browse files Browse the repository at this point in the history
… locally
  • Loading branch information
d4rky-pl committed Jan 5, 2024
1 parent 8ff00d1 commit ab78f3f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ end

desc 'Setup and run all tests'
task :setup_and_run_tests do
ENV['BUNDLE_GEMFILE'] = File.join(__dir__, 'gemfiles', "#{ENV['RAILS_VERSION']}.gemfile") if ENV['RAILS_VERSION']

unless ENV['BUNDLE_GEMFILE']
puts 'You need to specify either BUNDLE_GEMFILE pointing to a Gemfile in gemfiles/ directory or RAILS_VERSION or the tests will fail.'
exit 1
end

Rake::Task[:dummy_generate].invoke unless File.exist?('test/dummy/config/environment.rb')
Rake::Task[:test].invoke
end
Expand Down

0 comments on commit ab78f3f

Please sign in to comment.