spec/spec_helper.rb in rubocop-rspec-1.2.1 vs spec/spec_helper.rb in rubocop-rspec-1.2.2

- old
+ new

@@ -1,10 +1,22 @@ # encoding: utf-8 -# As much as possible, we try to reuse RuboCop's spec environment. -require File.join( - Gem::Specification.find_by_name('rubocop').gem_dir, 'spec', 'spec_helper.rb' -) +require 'rubocop' + +rubocop_gem_path = Gem::Specification.find_by_name('rubocop').gem_dir +Dir["#{rubocop_gem_path}/spec/support/**/*.rb"].each { |f| require f } + +RSpec.configure do |config| + config.order = :random + + config.expect_with :rspec do |expectations| + expectations.syntax = :expect # Disable `should` + end + + config.mock_with :rspec do |mocks| + mocks.syntax = :expect # Disable `should_receive` and `stub` + end +end $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rubocop-rspec'