Project

General

Profile

Patch #13068 ยป coverage_for_plugin_tests_on_mri_19.patch

Harry Garrood, 2013-02-03 17:11

View differences:

Gemfile
82 82
  gem "test-unit", :platforms => platforms
83 83
  gem "mocha", "0.12.3"
84 84
  gem 'capybara', '~> 2.0.0'
85
  gem 'simplecov', :platforms => [:mri_19]
85 86
end
86 87

  
87 88
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
lib/tasks/redmine.rake
119 119
        t.pattern = "plugins/#{ENV['NAME'] || '*'}/test/integration/**/*_test.rb"
120 120
      end
121 121
    end
122

  
123
    desc 'Measures test coverage for a plugin.'
124
    task :coverage do
125
      name = ENV['NAME']
126
      abort 'this task requires an argument NAME' unless name
127
      abort "plugin #{name} not found" unless File.directory?("plugins/#{name}")
128
      cd "plugins/#{name}"
129
      rm_f "coverage"
130
      require 'simplecov'
131
      SimpleCov.start 'rails'
132
      Dir.glob('test/**/*_test.rb').each { |f| require "./#{f}" }
133
    end
122 134
  end
123 135
end
124 136

  
    (1-1/1)