Bugs: Browse | Submit New | Admin

[#25814] No file to analyze was found

Date:
2009-05-07 01:56
Priority:
3
Submitted By:
Carlos Eduardo Santos (cadu)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
No file to analyze was found

Detailed description
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
rcov 0.8.1.2 2007-11-22

$ ls -R
.:
bowling.rb  test/

./test:
bowling_test.rb
$ rcov --text-coverage --no-color --spec-only test/*.rb

No file to analyze was found. All the files loaded by rcov matched one of the
following expressions, and were thus ignored:
[/\A\/usr\/lib/,
 /\btc_[^.]*.rb/,
 /_test\.rb\z/,
 /\btest\//,
 /\bvendor\//,
 /\A\/usr\/lib\/ruby\/gems\/1\.8\/gems\/rcov\-0\.8\.1\.2\.0\/lib\/rcov\/report\.rb\z/]

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 regexps
* use --include-file to give a list of patterns for files not to be ignored
* 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. by
  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).
/usr/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0/bin/rcov:525:in `instance_method': undefined method `run' for class
`Spec::Example::ExampleGroup' (NameError)
        from /usr/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0/bin/rcov:525
        from /usr/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0/bin/rcov:533:in `instance_eval'
        from /usr/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0/bin/rcov:533
        from /usr/bin/rcov:19:in `load'
        from /usr/bin/rcov:19

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item