spec/spec_helper.rb in rubocop-rspec-1.3.0 vs spec/spec_helper.rb in rubocop-rspec-1.3.1

- old
+ new

@@ -1,10 +1,13 @@ # encoding: utf-8 require 'rubocop' -rubocop_gem_path = Gem::Specification.find_by_name('rubocop').gem_dir -Dir["#{rubocop_gem_path}/spec/support/**/*.rb"].each { |f| require f } +rubocop_path = File.join(File.dirname(__FILE__), '../vendor/rubocop') +unless File.directory?(rubocop_path) + fail "Can't run specs without a local RuboCop checkout. Look in the README." +end +Dir["#{rubocop_path}/spec/support/**/*.rb"].each { |f| require f } RSpec.configure do |config| config.order = :random config.expect_with :rspec do |expectations|