Sha256: e4df5ce2a6a771952ac70cd328a729438f110ab7ce5b96db2543434701efa97f

Contents?: true

Size: 797 Bytes

Versions: 1

Compression:

Stored size: 797 Bytes

Contents

# frozen_string_literal: true

describe 'manifest', chdir: false do
  let(:manifest_lines) do
    File.readlines('nanoc.manifest').map(&:chomp).reject(&:empty?)
  end

  let(:gemspec_lines) do
    gemspec = eval(File.read('nanoc.gemspec'), binding, 'nanoc.gemspec')
    gemspec.files
  end

  it 'contains all files in gemspec' do
    missing_from_manifest = gemspec_lines - manifest_lines
    expect(missing_from_manifest).to be_empty, "Found files that appear in the gemspec, but not in the manifest: #{missing_from_manifest.join(', ')}"
  end

  it 'contains no files not in gemspec' do
    extra_in_manifest = manifest_lines - gemspec_lines
    expect(extra_in_manifest).to be_empty, "Found files that appear in the manifest, but not in the gemspec: #{extra_in_manifest.join(', ')}"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nanoc-4.8.12 spec/manifest_spec.rb