Skip to content

ejdraper/cover-up

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cover-up: a dynamic coverage tool for Ruby code

Usage:

	gem "cover-up"
	require "cover-up"
	
	results = coverage(:include => "app/*/**.rb") do
		run_tests
	end
	
	results # this now contains coverage results based on the input pattern filter, and the Ruby code being executed
	
You can also optionally run your own logger inside the code coverage execution, for example:

	logger = Proc.new do |event, file, line, id, binding, klass|
	  puts "#{file} (#{line}): #{event}"
    end

    results = coverage(:include => "app/*/**.rb", :logger => logger) do
		run_tests
    end

This will print out trace logging information from the code coverage run to the console, similar to the following:

/path/cover-up/tests/../lib/cover-up.rb (89): line
/path/cover-up/tests/coverage_tests.rb (127): line
/path/cover-up/tests/coverage_tests.rb (144): call
/path/cover-up/tests/coverage_tests.rb (145): line
/path/cover-up/tests/coverage_tests.rb (146): return

You can of course log the information in any way you'd like, by writing a custom logger handler and passing that into the code coverage options.

About

CoverUp is a dynamic code coverage tool for Ruby code.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages