spec/project_spec.rb in rubocop-rspec-1.0.rc2 vs spec/project_spec.rb in rubocop-rspec-1.0.rc3

- old
+ new

@@ -1,22 +1,23 @@ # encoding: utf-8 require 'spec_helper' -describe 'RuboCop Project' do # rubocop:disable RSpecDescribeClass +describe 'RuboCop Project' do # rubocop:disable RSpec/DescribeClass describe 'default configuration file' do let(:cop_names) do Dir.glob(File.join(File.dirname(__FILE__), '..', 'lib', 'rubocop', 'cop', - '*.rb')) + 'rspec', '*.rb')) .map do |file| - File.basename(file, '.rb') + cop_name = File.basename(file, '.rb') .gsub(/(^|_)(.)/) { Regexp.last_match(2).upcase } - .gsub('Rspec', 'RSpec') + + "RSpec/#{cop_name}" end end subject(:default_config) do - Rubocop::ConfigLoader.load_file('config/default.yml') + RuboCop::ConfigLoader.load_file('config/default.yml') end it 'has configuration for all cops' do expect(default_config.keys.sort).to eq((cop_names).sort) end