diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a8132b4..a9244a7 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -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