diff options
| author | Melissa Stone <melissa@puppet.com> | 2018-04-13 15:10:47 -0700 |
|---|---|---|
| committer | Melissa Stone <melissa@puppet.com> | 2018-04-16 16:19:34 -0700 |
| commit | 42416d957e7a96d156c532480018201e3c5ef487 (patch) | |
| tree | 8d7248a2b59c7d5150c525cb82289fac977c3f97 /spec/shared_behaviours | |
| parent | 88cd8802c5841b619baa3df2313f7b1fdf68308f (diff) | |
| download | puppet-mailalias_core-42416d957e7a96d156c532480018201e3c5ef487.tar.gz puppet-mailalias_core-42416d957e7a96d156c532480018201e3c5ef487.tar.bz2 | |
Fix rubocop violations
Diffstat (limited to 'spec/shared_behaviours')
| -rw-r--r-- | spec/shared_behaviours/all_parsedfile_providers.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/shared_behaviours/all_parsedfile_providers.rb b/spec/shared_behaviours/all_parsedfile_providers.rb index 9fdf54b..d697a14 100644 --- a/spec/shared_behaviours/all_parsedfile_providers.rb +++ b/spec/shared_behaviours/all_parsedfile_providers.rb @@ -1,5 +1,5 @@ -shared_examples_for "all parsedfile providers" do |provider, *files| - if files.empty? then +shared_examples_for 'all parsedfile providers' do |provider, *files| + if files.empty? files = my_fixtures end @@ -9,12 +9,12 @@ shared_examples_for "all parsedfile providers" do |provider, *files| provider.prefetch text = provider.to_file(provider.target_records(file)) - text.gsub!(/^# HEADER.+\n/, '') + text.gsub!(%r{^# 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+/, '')) + expect(new.gsub(%r{\s+}, '')).to eq(old.chomp.gsub(%r{\s+}, '')) end end end |
