Project

General

Profile

Defect #39834 » 0001-Fix-test-runner-Follow-commit-https-github.com-rails.patch

Takashi Kato, 2023-12-12 13:49

View differences:

lib/tasks/redmine.rake
179 179
      desc 'Runs the plugins unit tests.'
180 180
      task :units => "db:test:prepare" do |t|
181 181
        $: << "test"
182
        Rails::TestUnit::Runner.rake_run ["plugins/#{ENV['NAME'] || '*'}/test/unit/**/*_test.rb"]
182
        Rails::TestUnit::Runner.run_from_rake 'test', ["plugins/#{ENV['NAME'] || '*'}/test/unit/**/*_test.rb"]
183 183
      end
184 184

  
185 185
      desc 'Runs the plugins functional tests.'
186 186
      task :functionals => "db:test:prepare" do |t|
187 187
        $: << "test"
188
        Rails::TestUnit::Runner.rake_run ["plugins/#{ENV['NAME'] || '*'}/test/functional/**/*_test.rb"]
188
        Rails::TestUnit::Runner.run_from_rake 'test', ["plugins/#{ENV['NAME'] || '*'}/test/functional/**/*_test.rb"]
189 189
      end
190 190

  
191 191
      desc 'Runs the plugins integration tests.'
192 192
      task :integration => "db:test:prepare" do |t|
193 193
        $: << "test"
194
        Rails::TestUnit::Runner.rake_run ["plugins/#{ENV['NAME'] || '*'}/test/integration/**/*_test.rb"]
194
        Rails::TestUnit::Runner.run_from_rake 'test', ["plugins/#{ENV['NAME'] || '*'}/test/integration/**/*_test.rb"]
195 195
      end
196 196

  
197 197
      desc 'Runs the plugins system tests.'
198 198
      task :system => "db:test:prepare" do |t|
199 199
        $: << "test"
200
        Rails::TestUnit::Runner.rake_run ["plugins/#{ENV['NAME'] || '*'}/test/system/**/*_test.rb"]
200
        Rails::TestUnit::Runner.run_from_rake 'test', ["plugins/#{ENV['NAME'] || '*'}/test/system/**/*_test.rb"]
201 201
      end
202 202

  
203 203
      desc 'Runs the plugins ui tests.'
204 204
      task :ui => "db:test:prepare" do |t|
205 205
        $: << "test"
206
        Rails::TestUnit::Runner.rake_run ["plugins/#{ENV['NAME'] || '*'}/test/ui/**/*_test.rb"]
206
        Rails::TestUnit::Runner.run_from_rake 'test', ["plugins/#{ENV['NAME'] || '*'}/test/ui/**/*_test.rb"]
207 207
      end
208 208
    end
209 209
  end
lib/tasks/testing.rake
98 98

  
99 99
    task(:units => "db:test:prepare") do |t|
100 100
      $: << "test"
101
      Rails::TestUnit::Runner.rake_run FileList['test/unit/repository*_test.rb'] + FileList['test/unit/lib/redmine/scm/**/*_test.rb']
101
      Rails::TestUnit::Runner.run_from_rake 'test', FileList['test/unit/repository*_test.rb'] + FileList['test/unit/lib/redmine/scm/**/*_test.rb']
102 102
    end
103 103
    Rake::Task['test:scm:units'].comment = "Run the scm unit tests"
104 104

  
105 105
    task(:functionals => "db:test:prepare") do |t|
106 106
      $: << "test"
107
      Rails::TestUnit::Runner.rake_run FileList['test/functional/repositories*_test.rb']
107
      Rails::TestUnit::Runner.run_from_rake 'test', FileList['test/functional/repositories*_test.rb']
108 108
    end
109 109
    Rake::Task['test:scm:functionals'].comment = "Run the scm functional tests"
110 110
  end
111 111

  
112 112
  task(:routing) do |t|
113 113
    $: << "test"
114
    Rails::TestUnit::Runner.rake_run FileList['test/integration/routing/*_test.rb'] + FileList['test/integration/api_test/*_routing_test.rb']
114
    Rails::TestUnit::Runner.run_from_rake 'test', FileList['test/integration/routing/*_test.rb'] + FileList['test/integration/api_test/*_routing_test.rb']
115 115
  end
116 116
  Rake::Task['test:routing'].comment = "Run the routing tests"
117 117
end
(1-1/2)