Ruby-2.0.0p247 ActiveRecord-4.0.1 Cucumber 1.3.10 Aruba-0.5.3 SimpleCove-0.8.2
We use Cucumber with Aruba in a NON-RAILS project that nonetheless uses ActiveRecord. Our cucumber features exercise the code both in-process and out-of-process. The out-of-process code is executed using the same loader sequences as in production through a startup stub in bin:
#!/usr/bin/env ruby
require 'bundler/setup'
Bundler.require
require 'pathname'
my_dir = Pathname.new(
File.join( File.dirname(
__FILE__ ), '../', 'lib/' ) ).realpath.to_s + '/'
require my_dir + File.basename( __FILE__ )
HllThForexRssFetch::Main.new( ARGV ).execute
#EOF
Our features/support/env.rb file contains this:
$ cat features/support/env.rb
# Must load and start simplecov before any application code
require 'simplecov'
SimpleCov.start do
add_filter "/features/"
add_filter "/libexec"
add_filter "/lib/hll_active_record/"
add_filter "/test/"
add_filter "/tmp/"
end
SimpleCov.command_name( "Cucumber Features" )
# Do not use cucumber/rails in standalone projects
#require 'cucumber/rails'
. . .
When our step definitions call the external bin/file through aruba's run command the step definitions work properly and the tests complete as expected but the code coverage is not merged with the rest of the run. What I am seeking are instructions for how to set up simplecov to report the code coverage of the out-of-process tests together with the portions that are run in-process by cucumber directly.
How does one do this?