From f6dc748cbd77dd9012df978d44fff94c28e4efa7 Mon Sep 17 00:00:00 2001 From: Yosuke Kabuto Date: Sat, 2 Jan 2016 16:41:04 +0900 Subject: [PATCH] Remove $LOAD_PATH.uniq! because $LOAD_PATH does not contain any duplicate path --- spec/spec_helper.rb | 3 --- spec/spec_helper/load_path_spec.rb | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 99a3b1b29..c8bd04378 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -19,9 +19,6 @@ 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 4d0139bb5..31fc1fed9 100644 --- a/spec/spec_helper/load_path_spec.rb +++ b/spec/spec_helper/load_path_spec.rb @@ -27,4 +27,7 @@ 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 path') do + expect($LOAD_PATH).to match_array($LOAD_PATH.uniq!) + end end