diff --git a/features/support/env.rb b/features/support/env.rb index 241c6b1b0..a0948aee4 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1,6 +1,6 @@ PROJECT_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..", "..")) -require "simplecov" +require "simplecov" if RUBY_ENGINE == "ruby" $: << File.join(PROJECT_ROOT, "lib") diff --git a/spec/factory_bot/find_definitions_spec.rb b/spec/factory_bot/find_definitions_spec.rb index cb7208d78..17fc3c249 100644 --- a/spec/factory_bot/find_definitions_spec.rb +++ b/spec/factory_bot/find_definitions_spec.rb @@ -1,3 +1,5 @@ +require "fileutils" + shared_examples_for "finds definitions" do before do allow(FactoryBot).to receive(:load) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c97be814b..b46985956 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,7 @@ require "rspec" require "rspec/its" -require "simplecov" +require "simplecov" if RUBY_ENGINE == "ruby" require "factory_bot"