Sha256: 3b667fef7c028eb6ac27d6b4b17858265181295b6114a2ccaf57783b0a2c5bdb

Contents?: true

Size: 604 Bytes

Versions: 131

Compression:

Stored size: 604 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|
        new.gsub(/\s+/, '').should == old.chomp.gsub(/\s+/, '')
      end
    end
  end
end

Version data entries

131 entries across 131 versions & 3 rubygems

Version Path
puppet-3.8.7 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.7-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.7-x64-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.6 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.6-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.6-x64-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.5 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.5-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.5-x64-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.4 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.4-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.4-x64-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.3 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.3-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.3-x64-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.2 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.2-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.2-x64-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.1 spec/shared_behaviours/all_parsedfile_providers.rb
puppet-3.8.1-x86-mingw32 spec/shared_behaviours/all_parsedfile_providers.rb