Can't get rcov to work. 0 assertions returned

Hi folks. First post on these forums, after finally giving up on I recently installed the relevance fork of rcov and am
having no luck at all.

sudo gem install relevance-rcov

Easy enough. Everything seems to have worked. I can type rcov on the
command line and see the help file. But when I run the following

rcov test/*.rb

I get back 0 tests, 0 assertions, 0 failures, 0 errors. Even though I
have plenty of tests sitting right in there. If I try running rcov
against a specific file, such as:

rcov test/unit/user_test.rb

…I get the following error.

No file to analyze was found. All the files loaded by rcov matched one
of the
following expressions, and were thus ignored:

You can solve this by doing one or more of the following:
* rename the files not to be ignored so they don't match the above
* use --include-file to give a list of patterns for files not to be
* use --exclude-only to give the new list of regexps to match against
* structure your code as follows:
      test/test_*.rb  for the test cases
      lib/**/*.rb     for the target source code whose coverage you want
  making sure that the test/test_*.rb files are loading from lib/, e.g.
  using the -Ilib command-line argument, adding
    $:.unshift File.join(File.dirname(__FILE__), "..", "lib")
  to test/test_*.rb, or running rcov via a Rakefile (read the RDoc
  documentation or README.rake in the source distribution).
`gem_original_require': no such file to load -- test_helper (LoadError)
  from ./test/unit/address_test.rb:19
  from /usr/local/bin/rcov:19:in `load'
  from /usr/local/bin/rcov:19

Any ideas? Cheers.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs