Invoking Custom Adapter in .simplecov Dies in Cucumber
I'm hoping this is just for my project, but thought I'd write down the steps to reproduce just in case. I created a custom adapter in lib/simplecov_appname_adapater.rb that simply did:
SimpleCov.adapters.define 'appname' do
load_adapter 'rails'
add_filter '.bundle'
end
Then in the .simplecov file I had:
require 'simplecov_appname_adapter'
SimpleCov.start 'appname'
This seems to work fine in RSpec, but in Cucumber it states that simplecov_
For now I'm just nuked the custom adapter and simply moved my filters into .simplecov such that it looks like:
SimpleCov.start 'rails' do
add_filter '.bundle'
end
Thanks for such an awesome gem!
I strongly suspect the $LOAD_PATH is set up differently in Cucumber, e.g. it appears the rails lib dir is not present in cucumber.
If you only use the adapter in this application, I totally recommend your current solution of just defining things in .simplecov. Adapters are both for supplying reusable parts from the simplecov gem (or other gems) and also were useful before the central .simplecov file was available. Right now, for single project config and multiple test suites, .simplecov is the way to go.
Glad you like the gem :)