$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

if RUBY_ENGINE == 'ruby'
# require before 'metasploit/version' so coverage is shown for files required by 'metasploit/version'
  require 'simplecov'
end

require 'metasploit/version'

# Use find_all_by_name instead of find_by_name as find_all_by_name will return pre-release versions
gem_specification = Gem::Specification.find_all_by_name('metasploit-version').first

Dir[File.join(gem_specification.gem_dir, 'spec', 'support', '**', '*.rb')].each do |f|
  require f
end

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

# require before 'metasploit/version' so coverage is shown for files required by 'metasploit/version'
require 'simplecov'

require 'metasploit/version'

# Use find_all_by_name instead of find_by_name as find_all_by_name will return pre-release versions
gem_specification = Gem::Specification.find_all_by_name('metasploit-version').first

Dir[File.join(gem_specification.gem_dir, 'spec', 'support', '**', '*.rb')].each do |f|
  require f
end

--- 
+++ 
@@ -1,7 +1,9 @@
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 
+if RUBY_ENGINE == 'ruby'
 # require before 'metasploit/version' so coverage is shown for files required by 'metasploit/version'
-require 'simplecov'
+  require 'simplecov'
+end
 
 require 'metasploit/version'
 
Disable simplecov for JRuby and rbx for specs

MSP-11103

Had to disable for cucumber, so disable for specs too since coverage is
only complete with both cucumber and specs.
