A SimpleCov formatter that outputs missing line and branch coverage inline.
Can be configured to filter to certain files and skip output as needed.
Comes with a rails+rspec integration that:
- filters to only the rspec file and the file of the module being tested.
- skips output if any examples fail
- skips output if no examples were run
- skips output if not all examples within a spec file are run
Install the gem and add to the application's Gemfile by executing:
$ bundle add simplecov-inline --github="appbot/simplecov-inline"
SimpleCov.formatter = SimpleCov::Formatter::Inline
SimpleCov::Inline::Integration.configure_rspec_rails
If you are not using rspec and rails you can manually filter to a set of files.
SimpleCov::Formatter::Inline.config do |config|
config.files = ['/path/to/your/file.rb']
end
If you are not using rspec and rails you can turn off the formatter with a reason.
SimpleCov::Formatter::Inline.config do |config|
config.no_output!(reason: 'your reason here')
end
After checking out the repo, run rake
to run the tests and rubocop. You can also run bin/console
for an interactive prompt that will allow you to experiment.
If would like to use docker, you can run docker/rake
to save yourself having to install ruby locally.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/appbot/simplecov-inline. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the SimpleCov::Formatter::Inline project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.