Require all plugin code so rcov works and reports on everything

This commit is contained in:
Eric Davis
2008-11-30 01:59:20 -08:00
parent f7c2816e13
commit 01d8159e0e
+9
View File
@@ -41,3 +41,12 @@ Spec::Runner.configure do |config|
# config.mock_with :flexmock
# config.mock_with :rr
end
# require the entire app if we're running under coverage testing,
# so we measure 0% covered files in the report
#
# http://www.pervasivecode.com/blog/2008/05/16/making-rcov-measure-your-whole-rails-app-even-if-tests-miss-entire-source-files/
if defined?(Rcov)
all_app_files = Dir.glob('{app,lib}/**/*.rb')
all_app_files.each{|rb| require rb}
end