Sha256: 8f3253ec5f378b47695c1c5a1b65f72ed9acd2a9468d77e7c58ba576a6f1267f

Contents?: true

Size: 479 Bytes

Versions: 15

Compression:

Stored size: 479 Bytes

Contents

require 'spec_helper'

include Reek

describe Dir do
  it 'reports correct smells via the Dir matcher' do
    files = Dir['spec/samples/two_smelly_files/*.rb']
    expect(files).to reek
    expect(files).to reek_of(:UncommunicativeVariableName)
    expect(files).not_to reek_of(:LargeClass)
  end

  it 'copes with daft file specs' do
    expect(Dir['spec/samples/two_smelly_files/*/.rb']).not_to reek
  end

  it 'copes with empty array' do
    expect([]).not_to reek
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
reek-2.0.4 spec/reek/source/object_source_spec.rb
reek-2.0.3 spec/reek/source/object_source_spec.rb
reek-2.0.2 spec/reek/source/object_source_spec.rb
reek-2.0.1 spec/reek/source/object_source_spec.rb
reek-2.0.0 spec/reek/source/object_source_spec.rb
reek-1.6.6 spec/reek/source/object_source_spec.rb
reek-1.6.5 spec/reek/source/object_source_spec.rb
reek-1.6.4 spec/reek/source/object_source_spec.rb
reek-1.6.3 spec/reek/source/object_source_spec.rb
reek-1.6.2 spec/reek/source/object_source_spec.rb
reek-1.6.1 spec/reek/source/object_source_spec.rb
reek-1.6.0 spec/reek/source/object_source_spec.rb
reek-1.5.1 spec/reek/source/object_source_spec.rb
reek-1.5.0 spec/reek/source/object_source_spec.rb
reek-1.4.0 spec/reek/source/object_source_spec.rb