
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
ViewsCoverage is Minitest plugin for showing which views or partials was generated during tests. Plugin listening for render notification from Rails framework and save data from this event (path to view and how many times it was generated).
Add this line to your application's Gemfile:
gem 'views_coverage'
And then execute:
$ bundle
Warning: Plugin dont support parallel tests. If you want to use this plugin, set parallelize(workers: 1)
or comment parallelize
line in your test_helper.rb
.
Basic usage is run tests with --views-coverage
flag:
rails test --views-coverage
or if you run system tests, this flag must be passed in TESTOPS:
rails test:system TESTOPTS="--views-coverage"
This command will generate following files:
views_coverage_result_unit_pretty.txt
and views_coverage_result_unit.yml
views_coverage_result_system_pretty.txt
and views_coverage_result_system.yml
*.txt
files are containing pretty printed coverage output.
*.yml
files are containing coverage for "merge" mode (viz next paragraph).
If you want to merge results from multiple test runs (for example from unit tests and system tests), you should pass --views-coverage-mode=merge
when running tests:
rails test:system TESTOPTS="--views-coverage --views-coverage-mode=merge"
This mode load content of YML files and merge their results into views_coverage_result_merged_pretty.txt
and views_coverage_result_merged_pretty.yml
files.
Bug reports and pull requests are welcome on GitHub at https://github.com/jchsoft/views_coverage. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the ViewsCoverage project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that views_coverage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.