Skip to content

Commit 029be4c

Browse files
committed
[MODEL] Run unit tests against all Gemfiles
Also, reduce the verbosity of tests
1 parent f547cfa commit 029be4c

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

elasticsearch-model/Rakefile

+11-4
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ namespace :test do
2323
Rake::Task['ci:setup:minitest'].invoke
2424
end
2525

26-
Rake::TestTask.new(:unit) do |test|
26+
Rake::TestTask.new(:run_unit) do |test|
2727
Rake::Task['test:ci_reporter'].invoke if ENV['CI']
2828
test.libs << 'lib' << 'test'
2929
test.test_files = FileList["test/unit/**/*_test.rb"]
30-
# test.verbose = true
31-
# test.warning = true
30+
test.verbose = false
31+
test.warning = false
3232
end
3333

3434
Rake::TestTask.new(:run_integration) do |test|
@@ -39,9 +39,16 @@ namespace :test do
3939
test.warning = false
4040
end
4141

42+
desc "Run unit tests against ActiveModel 3, 4 and 5"
43+
task :unit do
44+
sh "BUNDLE_GEMFILE='#{File.expand_path('../gemfiles/3.0.gemfile', __FILE__)}' bundle exec rake test:run_unit"
45+
sh "BUNDLE_GEMFILE='#{File.expand_path('../gemfiles/4.0.gemfile', __FILE__)}' bundle exec rake test:run_unit"
46+
sh "BUNDLE_GEMFILE='#{File.expand_path('../gemfiles/5.0.gemfile', __FILE__)}' bundle exec rake test:run_unit"
47+
end
48+
4249
desc "Run integration tests against ActiveModel 3, 4 and 5"
4350
task :integration do
44-
sh "BUNDLE_GEMFILE='#{File.expand_path('../gemfiles/3.0.gemfile', __FILE__)}' bundle exec rake test:run_integration" unless defined?(RUBY_VERSION) && RUBY_VERSION > '2.2'
51+
sh "BUNDLE_GEMFILE='#{File.expand_path('../gemfiles/3.0.gemfile', __FILE__)}' bundle exec rake test:run_integration"
4552
sh "BUNDLE_GEMFILE='#{File.expand_path('../gemfiles/4.0.gemfile', __FILE__)}' bundle exec rake test:run_integration"
4653
sh "BUNDLE_GEMFILE='#{File.expand_path('../gemfiles/5.0.gemfile', __FILE__)}' bundle exec rake test:run_integration"
4754
end

0 commit comments

Comments
 (0)