Sha256: b2c7c7e9557b05d70a45d840e873fa40ac02da874633f996de71b21e2f0d6779

Contents?: true

Size: 802 Bytes

Versions: 1

Compression:

Stored size: 802 Bytes

Contents

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

RSpec.describe Reek::Configuration::ExcludedPaths do
  describe '#add' do
    let(:exclusions) { [].extend(described_class) }
    let(:paths) do
      %w(samples/directory_does_not_exist/
         samples/source_with_non_ruby_files/
         samples/**/ignore_me*)
    end

    let(:expected_exclude_paths) do
      [Pathname('samples/source_with_non_ruby_files/'),
       Pathname('samples/source_with_exclude_paths/ignore_me'),
       Pathname('samples/source_with_exclude_paths/nested/ignore_me_as_well')]
    end

    it 'adds the given paths as Pathname' do
      exclusions.add(paths)
      expect(exclusions).to match_array expected_exclude_paths
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
reek-6.0.3 spec/reek/configuration/excluded_paths_spec.rb