spec/project/default_config_spec.rb in rubocop-rspec-1.7.0 vs spec/project/default_config_spec.rb in rubocop-rspec-1.8.0
- old
+ new
@@ -18,11 +18,11 @@
cop_names + %w(AllCops)
end
def cop_configuration(config_key)
cop_names.map do |cop_name|
- cop_config = default_config.fetch(cop_name)
+ cop_config = default_config[cop_name]
cop_config.fetch(config_key) do
raise "Expected #{cop_name} to have #{config_key} configuration key"
end
end
@@ -45,8 +45,8 @@
it 'ends every description with a period' do
expect(cop_configuration('Description')).to all(end_with('.'))
end
it 'includes Enabled: true for every cop' do
- expect(cop_configuration('Enabled')).to all(be(true))
+ expect(cop_configuration('Enabled')).to all(be(true).or(be(false)))
end
end