Guys I''ve been struggling with this one for a couple of hours, and nothing seems to work here, any advice would be duly appreciated... Background: I''m busy working on a plugin called "shared_models", allowing you to easily share models between different applications, running different database or on the same database. The plugin is nearly complete, offering a generator that generates models, unit tests, fixtures and even migrations. Some other goodies included too, but you''ll have to wait for the release :) Problem: I''m trying to add a rake task that will generate coverage information for the shared_models, but I can''t get this to work properly. rcov keeps on spitting out coverage information for the application housing the plugin. <vendor/plugins/shared_models/tasks/rcov.rake> require ''rcov/rcovtask'' namespace :shared_models do namespace :test do Rcov::RcovTask.new(:coverage) do |t| t.libs << "#{File.dirname(__FILE__)}/../test" t.test_files = FileList["#{File.dirname(__FILE__)}/../test/*.rb", "#{File.dirname(__FILE__)}/../test/unit/*_test.rb"] t.output_dir = "#{File.dirname(__FILE__)}/../test/coverage" t.verbose = true end end end </vendor/plugins/shared_models/tasks/rcov.rake> rcov is running, and from the debug output I can see that the correct files are loaded inside the plugins'' test, and test/unit directories. Below is the output from running the task: <rake shared_models:test:coverage> rm -r ./vendor/plugins/shared_models/tasks/../test/coverage /usr/bin/ruby18 -Ilib:./vendor/plugins/shared_models/tasks/../test -S rcov --text-report -o "./vendor/plugins/shared_models/tasks/../test/coverage" "./vendor/plugins/shared_models/tasks/../test/test_helper.rb" "./vendor/plugins/shared_models/tasks/../test/shared_models_test.rb" "./vendor/plugins/shared_models/tasks/../test/unit/resource_test.rb" Loaded suite /usr/bin/rcov Started .. Finished in 0.023935 seconds. 2 tests, 2 assertions, 0 failures, 0 errors +----------------------------------------------------+-------+-------+--------+ | File | Lines | LOC | COV | +----------------------------------------------------+-------+-------+--------+ |app/controllers/application.rb | 6 | 3 | 100.0% | |app/helpers/application_helper.rb | 15 | 11 | 27.3% | |config/boot.rb | 44 | 35 | 62.9% | |config/environment.rb | 53 | 4 | 100.0% | |config/routes.rb | 22 | 5 | 100.0% | +----------------------------------------------------+-------+-------+--------+ |Total | 140 | 58 | 63.8% | +----------------------------------------------------+-------+-------+--------+ 63.8% 5 file(s) 140 Lines 58 LOC </rake shared_models:test:coverage> So, the task does clobber (and output to) the correct directory, but contains no coverage information for any of the code in the plugin... This is my last stumbling stone before releasing... Thanks in advance! -- Kenneth Kalmer kenneth.kalmer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Folding@home stats http://fah-web.stanford.edu/cgi-bin/main.py?qtype=userpage&username=kenneth%2Ekalmer --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---