I have a requirement where in, i need to get the coverage so far. If I stop the server, the report gets generated and I do get the coverage so far. But if i start the server again, my previous coverage results are lost and I can only get the coverage after the server was restarted.
Is there a way for me to keep checking periodically for the the coverage% - without stopping the server?
If i try to generate a report without starting the server, by using the following command, in rails console (SimpleCov.result.format! ),I dont get anycoverage number.
The following is my config in my config/boot.rb:
require 'simplecov'
SimpleCov.start 'rails' do
add_filter "/vendor/"
end
Please share your thoughts Thanks Ramya
This is the content of my boot.rb:
require 'simplecov'
# # create coverage directory if it doesn't exist already.
Dir.mkdir("coverage") unless Dir.exist?("coverage")
SimpleCov.start 'rails' do
SimpleCov.use_merging(true)
add_filter "/vendor/"
SimpleCov.merge_timeout 30
end
require 'rubygems'
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])