Sha256: 96611f4b3a1f49dd077c9574c6015738f06b2b66b3d90b8c6019bbe51215ec1e

Contents?: true

Size: 624 Bytes

Versions: 340

Compression:

Stored size: 624 Bytes

Contents

shared_examples_for "all parsedfile providers" do |provider, *files|
  if files.empty? then
    files = my_fixtures
  end

  files.flatten.each do |file|
    it "should rewrite #{file} reasonably unchanged" do
      allow(provider).to receive(:default_target).and_return(file)
      provider.prefetch

      text = provider.to_file(provider.target_records(file))
      text.gsub!(/^# HEADER.+\n/, '')

      oldlines = File.readlines(file)
      newlines = text.chomp.split "\n"
      oldlines.zip(newlines).each do |old, new|
        expect(new.gsub(/\s+/, '')).to eq(old.chomp.gsub(/\s+/, ''))
      end
    end
  end
end

Version data entries

340 entries across 340 versions & 1 rubygems

Version Path
puppet-8.3.0 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-8.3.0-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-8.3.0-x64-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-8.3.0-universal-darwin spec/shared_behaviours/all_parsedfile_providers.rb
puppet-8.4.0 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-8.4.0-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-8.4.0-x64-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-8.4.0-universal-darwin spec/shared_behaviours/all_parsedfile_providers.rb
puppet-7.28.0 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-7.28.0-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-7.28.0-x64-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-7.28.0-universal-darwin spec/shared_behaviours/all_parsedfile_providers.rb
puppet-8.3.1 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-8.3.1-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-8.3.1-x64-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-8.3.1-universal-darwin spec/shared_behaviours/all_parsedfile_providers.rb
puppet-7.27.0 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-7.27.0-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-7.27.0-x64-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-7.27.0-universal-darwin spec/shared_behaviours/all_parsedfile_providers.rb