diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 619fe4fe..7f947e9d 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -21,7 +21,7 @@ # run twice. It is recommended that you do not name files matching this glob to # end with _spec.rb. You can configure this pattern with the --pattern # option on the command line or in ~/.rspec, .rspec or `.rspec-local`. -Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } +Rails.root.glob('spec/support/**/*.rb').each { |f| require f } # Checks for pending migrations before tests are run. # If you are not using ActiveRecord, you can remove this line. diff --git a/spec/support/sphinx_helpers.rb b/spec/support/sphinx_helpers.rb index 55cc4c2b..92f08cdd 100644 --- a/spec/support/sphinx_helpers.rb +++ b/spec/support/sphinx_helpers.rb @@ -6,6 +6,6 @@ def index end def index_finished? - Dir[Rails.root.join(ThinkingSphinx::Test.config.indices_location, '*.{new,tmp}*')].empty? + Rails.root.glob("#{ThinkingSphinx::Test.config.indices_location}/*.{new,tmp}*").empty? end end