Add -Ilib to default rcov_opts
Created by: tianyicui
I'm always happy to have this line in my Rakefile:
RSpec::Core::RakeTask.new('rspec')
But when I want to add a rcov task like this:
RSpec::Core::RakeTask.new('rcov') do |t| t.rcov = true end
It won't work. Because 'lib' is not in $:
- rcov won't search there until you tell it to.
IMO, if a Rakefile contains the rspec
task as showed above, the rcov
task that only tweaked the rcov
property should be work out of box. So I suggest to add -Ilib
to the default options for the runner rcov
, because the rspec
runner will search there by default.
Thanks.