I have a simple Ruby app with the following structure
root
|___ app
|___ a.rb
|___ b.rb
|___ z.rb
|___ spec
|___ app
|___ a_spec.rb
|___ b_spec.rb
|___ z_spec.rb
|___ tasks
|___ atask_spec.rb
|___ spec_helper.rb
|____ tasks
|___ atask.rake
I'd like to check code coverage using simplecov so I have added the gem to my Gemfile and the following code to my spec helper
require 'simplecov'
SimpleCov.start do
add_filter '/spec/'
end
But, when I run all my specs (bin/rspec spec
) SimpleCov considers only the code in tasks/atask.rake
.
I have also checked SimpleCov.root
and it returns correctly the root.
Am I missing anything here?
Thanks