From a382d9be847db45dce870fc30fb4a453dd306ebb Mon Sep 17 00:00:00 2001 From: Yosuke Kabuto Date: Tue, 5 Jan 2016 15:18:56 +0900 Subject: [PATCH] Leave $LOAD_PATH.uniq! for jruby --- spec/spec_helper.rb | 2 ++ spec/spec_helper/load_path_spec.rb | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c8bd04378..879b2ebf6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -19,6 +19,8 @@ GENERATED_DIR = File.expand_path(File.join(ROOT_DIR, 'generated')) THIRD_PARTY_DIR = File.expand_path(File.join(ROOT_DIR, 'third_party')) FIXTURES_DIR = File.expand_path(File.join(SPEC_DIR, 'fixtures')) +$LOAD_PATH.uniq! + if defined?(JRUBY_VERSION) puts 'Skipping coverage on JRuby' else diff --git a/spec/spec_helper/load_path_spec.rb b/spec/spec_helper/load_path_spec.rb index 1ecd45d4b..9f6c70ad3 100644 --- a/spec/spec_helper/load_path_spec.rb +++ b/spec/spec_helper/load_path_spec.rb @@ -30,8 +30,4 @@ RSpec.describe $LOAD_PATH do it('should contain THIRD_PARTY_DIR') do expect($LOAD_PATH).to include(THIRD_PARTY_DIR) end - - it('should already have unique paths') do - expect($LOAD_PATH).to match_array($LOAD_PATH.uniq!) - end end