Sha256: fa22768b2b85f17b298c710b0b09785ea811fc104bab62d1e0b5060f0c87fb8e

Contents?: true

Size: 609 Bytes

Versions: 278

Compression:

Stored size: 609 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
      provider.stubs(:default_target).returns(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

278 entries across 278 versions & 1 rubygems

Version Path
puppet-6.4.0 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-6.4.0-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-6.4.0-x64-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-6.4.0-universal-darwin spec/shared_behaviours/all_parsedfile_providers.rb
puppet-6.0.7 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-6.0.7-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-6.0.7-x64-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-6.0.7-universal-darwin spec/shared_behaviours/all_parsedfile_providers.rb
puppet-5.5.12 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-5.5.12-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-5.5.12-x64-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-5.5.12-universal-darwin spec/shared_behaviours/all_parsedfile_providers.rb
puppet-6.3.0 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-6.3.0-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-6.3.0-x64-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-6.3.0-universal-darwin spec/shared_behaviours/all_parsedfile_providers.rb
puppet-6.2.0 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-6.2.0-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-6.2.0-x64-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-6.2.0-universal-darwin spec/shared_behaviours/all_parsedfile_providers.rb