| 178 | 
  178 | 
  
        namespace :test do 
   | 
  | 179 | 
  179 | 
  
          desc 'Runs the plugins unit tests.' 
   | 
  | 180 | 
  180 | 
  
          task :units => "db:test:prepare" do |t| 
   | 
  | 181 | 
   | 
  
            $: << "test" 
   | 
  | 182 | 
   | 
  
            Rails::TestUnit::Runner.run_from_rake 'test', ["plugins/#{ENV['NAME'] || '*'}/test/unit/**/*_test.rb"]
   | 
   | 
  181 | 
  
            pattern = "plugins/#{ENV['NAME'] || '*'}/test/unit/**/*_test.rb"
   | 
   | 
  182 | 
  
            if Dir.glob(pattern).any? 
   | 
   | 
  183 | 
  
              $: << "test" 
   | 
   | 
  184 | 
  
              Rails::TestUnit::Runner.run_from_rake 'test', [pattern] 
   | 
   | 
  185 | 
  
            end 
   | 
  | 183 | 
  186 | 
  
          end 
   | 
  | 184 | 
  187 | 
  
    
   | 
  | 185 | 
  188 | 
  
          desc 'Runs the plugins functional tests.' 
   | 
  | 186 | 
  189 | 
  
          task :functionals => "db:test:prepare" do |t| 
   | 
  | 187 | 
   | 
  
            $: << "test" 
   | 
  | 188 | 
   | 
  
            Rails::TestUnit::Runner.run_from_rake 'test', ["plugins/#{ENV['NAME'] || '*'}/test/functional/**/*_test.rb"]
   | 
   | 
  190 | 
  
            pattern = "plugins/#{ENV['NAME'] || '*'}/test/functional/**/*_test.rb"
   | 
   | 
  191 | 
  
            if Dir.glob(pattern).any? 
   | 
   | 
  192 | 
  
              $: << "test" 
   | 
   | 
  193 | 
  
              Rails::TestUnit::Runner.run_from_rake 'test', [pattern] 
   | 
   | 
  194 | 
  
            end 
   | 
  | 189 | 
  195 | 
  
          end 
   | 
  | 190 | 
  196 | 
  
    
   | 
  | 191 | 
  197 | 
  
          desc 'Runs the plugins integration tests.' 
   | 
  | 192 | 
  198 | 
  
          task :integration => "db:test:prepare" do |t| 
   | 
  | 193 | 
   | 
  
            $: << "test" 
   | 
  | 194 | 
   | 
  
            Rails::TestUnit::Runner.run_from_rake 'test', ["plugins/#{ENV['NAME'] || '*'}/test/integration/**/*_test.rb"]
   | 
   | 
  199 | 
  
            pattern = "plugins/#{ENV['NAME'] || '*'}/test/integration/**/*_test.rb"
   | 
   | 
  200 | 
  
            if Dir.glob(pattern).any? 
   | 
   | 
  201 | 
  
              $: << "test" 
   | 
   | 
  202 | 
  
              Rails::TestUnit::Runner.run_from_rake 'test', [pattern] 
   | 
   | 
  203 | 
  
            end 
   | 
  | 195 | 
  204 | 
  
          end 
   | 
  | 196 | 
  205 | 
  
    
   | 
  | 197 | 
  206 | 
  
          desc 'Runs the plugins system tests.' 
   | 
  | 198 | 
  207 | 
  
          task :system => "db:test:prepare" do |t| 
   | 
  | 199 | 
   | 
  
            $: << "test" 
   | 
  | 200 | 
   | 
  
            Rails::TestUnit::Runner.run_from_rake 'test', ["plugins/#{ENV['NAME'] || '*'}/test/system/**/*_test.rb"]
   | 
   | 
  208 | 
  
            pattern = "plugins/#{ENV['NAME'] || '*'}/test/system/**/*_test.rb"
   | 
   | 
  209 | 
  
            if Dir.glob(pattern).any? 
   | 
   | 
  210 | 
  
              $: << "test" 
   | 
   | 
  211 | 
  
              Rails::TestUnit::Runner.run_from_rake 'test', [pattern] 
   | 
   | 
  212 | 
  
            end 
   | 
  | 201 | 
  213 | 
  
          end 
   | 
  | 202 | 
  214 | 
  
    
   | 
  | 203 | 
  215 | 
  
          desc 'Runs the plugins ui tests.' 
   | 
  | 204 | 
  216 | 
  
          task :ui => "db:test:prepare" do |t| 
   | 
  | 205 | 
   | 
  
            $: << "test" 
   | 
  | 206 | 
   | 
  
            Rails::TestUnit::Runner.run_from_rake 'test', ["plugins/#{ENV['NAME'] || '*'}/test/ui/**/*_test.rb"]
   | 
   | 
  217 | 
  
            pattern = "plugins/#{ENV['NAME'] || '*'}/test/ui/**/*_test.rb"
   | 
   | 
  218 | 
  
            if Dir.glob(pattern).any? 
   | 
   | 
  219 | 
  
              $: << "test" 
   | 
   | 
  220 | 
  
              Rails::TestUnit::Runner.run_from_rake 'test', [pattern] 
   | 
   | 
  221 | 
  
            end 
   | 
  | 207 | 
  222 | 
  
          end 
   | 
  | 208 | 
  223 | 
  
        end 
   | 
  | 209 | 
  224 | 
  
      end 
   |