lib/discovery.rake in foreman_discovery-8.0.1 vs lib/discovery.rake in foreman_discovery-9.0.0

- old
+ new

@@ -2,10 +2,14 @@ namespace :test do desc "Test Discovery plugin" Rake::TestTask.new(:discovery) do |t| test_dir = File.join(File.dirname(__FILE__), '..', 'test') t.libs << ["test",test_dir] - t.pattern = "#{test_dir}/**/*_test.rb" + if ENV['FILE'] || ENV['TEST'] + t.pattern = ENV['FILE'] || ENV['TEST'] + else + t.pattern = "#{test_dir}/**/*_test.rb" + end t.verbose = true t.warning = false end end Rake::Task[:test].enhance do