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 9bb6b88 commit 0160c9b
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions lib/foreman_tasks/tasks/test.rake
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
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 << 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 0160c9b

Please sign in to comment.