Skip to content

Commit

Permalink
Clean up test task definition
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Oct 31, 2023
1 parent 452f212 commit cba7d9e
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions lib/foreman_tasks/tasks/test.rake
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
namespace :test do
task :foreman_tasks => 'db:test:prepare' do
test_task = Rake::TestTask.new('foreman_tasks_test_task') do |t|
t.libs << ['test', "#{ForemanTasks::Engine.root}/test"]
t.pattern = ForemanTasks::Engine.root.join('test/**/*_test.rb')
t.test_files = [Rails.root.join('test/unit/foreman/access_permissions_test.rb')]
t.verbose = true
t.warning = false
end

Rake::Task[test_task.name].invoke
desc 'Foreman Tasks plugin tests'
Rake::TestTask.new(foreman_tasks: 'db:test:prepare') do |t|
t.libs << Rails.root.join('test')
t.libs << ForemanTasks::Engine.root.join('test')
t.pattern = ForemanTasks::Engine.root.join('test/**/*_test.rb')
t.test_files = [Rails.root.join('test/unit/foreman/access_permissions_test.rb')]
t.verbose = true
t.warning = false
end

desc 'Alias for test:foreman_tasks'
Expand Down

0 comments on commit cba7d9e

Please sign in to comment.