spec/reek/configuration/app_configuration_spec.rb in reek-4.1.1 vs spec/reek/configuration/app_configuration_spec.rb in reek-4.2.0

- old
+ new

@@ -4,16 +4,10 @@ require_lib 'reek/configuration/directory_directives' require_lib 'reek/configuration/default_directive' require_lib 'reek/configuration/excluded_paths' RSpec.describe Reek::Configuration::AppConfiguration do - describe '#new' do - it 'raises NotImplementedError' do - expect { subject }.to raise_error(NotImplementedError) - end - end - describe 'factory methods' do let(:expected_excluded_paths) do [SAMPLES_PATH.join('two_smelly_files'), SAMPLES_PATH.join('source_with_non_ruby_files')] end @@ -63,9 +57,19 @@ expect(config.send(:excluded_paths)).to eq(expected_excluded_paths) expect(config.send(:default_directive)).to eq(expected_default_directive) expect(config.send(:directory_directives)).to eq(expected_directory_directives) end + end + end + + describe '#default' do + it 'returns a blank AppConfiguration' do + config = described_class.default + expect(config).to be_instance_of described_class + expect(config.send(:excluded_paths)).to eq([]) + expect(config.send(:default_directive)).to eq({}) + expect(config.send(:directory_directives)).to eq({}) end end describe '#directive_for' do context 'multiple directory directives and no default directive present' do