Code coverage for your current git branch using simplecov
Use git to find the ancestor commit you & master have in common, then collect all the files changed between then and now:
base_commit = `git merge-base master HEAD`.chomp
add_group 'This Branch' do |source_file|
%x[ git diff #{base_commit}..HEAD --name-only].split("\n").detect do |filename|
source_file.filename.ends_with?(filename)
end
end
Written by Andrew Nicholson
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#