紅寶石2.0.0p247 的ActiveRecord-4.0.1 黃瓜1.3.10 阿魯巴-0.5.3 SimpleCove-0.8.2一個人如何配置黃瓜/阿魯巴使用SimpleCov?
我們在仍然使用ActiveRecord的一個NON-Rails項目中使用黃瓜阿魯巴。我們的黃瓜功能可以在進程內和進程外執行代碼。過程外的代碼使用相同的加載器序列在生產箱執行通過啓動存根:
#!/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
我們的特點/支撐/ env.rb文件包含此:
$ 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'
。 。 。
當我們一步定義調用通過Aruba的運行外部斌/ file命令步驟定義正常工作,並完成測試,預期,但代碼覆蓋率不與運行的其餘部分合並。我所尋求的是如何建立simplecov到與在處理黃瓜直接運行部分一起彙報進程外,測試的代碼覆蓋率的指令。
這是怎麼回事?
我會將此標記,當我返回到該項目,並嘗試這種解決方案對自己的答案。 –