commondream / rcov_plugin

Rails plugin for rcov

This URL has Read+Write access

ultrasaurus (author)
Sun Sep 13 15:47:35 -0700 2009
commondream (committer)
Thu Sep 17 05:28:27 -0700 2009
commit  8f85dc1bc655a784d8a6454c81bd020e99ca44fd
tree    4d10ce740de38b9376a34e62d1e8996c90544b67
parent  65c29bb4bb5f7c4b552c5f57279cf2a39c7a0e42
name age message
file README.markdown Tue May 05 21:00:35 -0700 2009 Fixed link. [commondream]
directory tasks/ Loading commit data...
README.markdown

rcov_plugin

This is a simple rails plugin that adds some useful rcov tasks.

rake test:coverage                # Tests coverage on the entire application
rake test:coverage:units          # Tests coverage for unit tests
rake test:coverage:functionals    # Tests coverage for functional tests
rake test:coverage:integration    # Tests coverage for integration tests

The task ends up creating a coverage folder with an html coverage report in it.

SHOW_ONLY is a comma-separated list of the files you'd like to see (although you can only run functionals, you still see all the models and helpers which are 'touched'). Right now there are four types of files rake test:coverage recognizes: models, helpers, controllers, and lib. These can be abbreviated to their first letters:

rake test:coverage SHOW_ONLY=models
rake test:coverage SHOW_ONLY=helpers,controllers
rake test:coverage SHOW_ONLY=h,c

JRuby Support

rcov_plugin works great with JRuby.

If using JRuby, remember to run rake with it, like this:

jruby -S rake test:coverage

Special thanks go to Leonard Borges (http://www.leonardoborges.com) for getting the plugin working with JRuby.

Requirements

This task requires that you have rcov installed and on your path.

Contributors

Special thanks go to all of the contributors to this plugin:

  • leonardoborges
  • dovadi
  • baldowl
  • archfear

License

Copyright (c) 2008 Alan Johnson

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.