Sha256: 6e74ad1018b3e1a8f09050795da8aa6331eae7c76e0775d28986e7644d332821

Contents?: true

Size: 587 Bytes

Versions: 15

Compression:

Stored size: 587 Bytes

Contents

require_relative '../../spec_helper'
require_lib 'reek/configuration/excluded_paths'

RSpec.describe Reek::Configuration::ExcludedPaths do
  describe '#add' do
    let(:exclusions) { [].extend(described_class) }

    context 'one of given paths is a file' do
      let(:file_as_path) { SAMPLES_PATH.join('inline.rb') }
      let(:paths) { [SAMPLES_PATH, file_as_path] }

      it 'raises an error if one of the given paths is a file' do
        Reek::CLI::Silencer.silently do
          expect { exclusions.add(paths) }.to raise_error(SystemExit)
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
reek-4.7.3 spec/reek/configuration/excluded_paths_spec.rb
reek-4.7.2 spec/reek/configuration/excluded_paths_spec.rb
reek-4.7.1 spec/reek/configuration/excluded_paths_spec.rb
reek-4.7.0 spec/reek/configuration/excluded_paths_spec.rb
reek-4.6.2 spec/reek/configuration/excluded_paths_spec.rb
reek-4.6.1 spec/reek/configuration/excluded_paths_spec.rb
reek-4.6.0 spec/reek/configuration/excluded_paths_spec.rb
reek-4.5.6 spec/reek/configuration/excluded_paths_spec.rb
reek-4.5.5 spec/reek/configuration/excluded_paths_spec.rb
reek-4.5.4 spec/reek/configuration/excluded_paths_spec.rb
reek-4.5.3 spec/reek/configuration/excluded_paths_spec.rb
reek-4.5.2 spec/reek/configuration/excluded_paths_spec.rb
reek-4.5.1 spec/reek/configuration/excluded_paths_spec.rb
reek-4.5.0 spec/reek/configuration/excluded_paths_spec.rb
reek-4.4.2 spec/reek/configuration/excluded_paths_spec.rb