aboutsummaryrefslogtreecommitdiff
path: root/spec/shared_behaviours
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppet.com>2018-07-09 19:50:03 -0700
committerJosh Cooper <josh@puppet.com>2018-07-09 19:50:03 -0700
commit59f4a9e49d397556a60f060faffdc14b734856da (patch)
tree8b630a7d02fc4e6e207fc3d84b9d78c1f6637191 /spec/shared_behaviours
parent34e83e11a5fc344195217d9cd159d022b5d89ec1 (diff)
downloadpuppet-hosts_core-59f4a9e49d397556a60f060faffdc14b734856da.tar.gz
puppet-hosts_core-59f4a9e49d397556a60f060faffdc14b734856da.tar.bz2
Automatic validation updates
Updated rubocop violations using `pdk validate -a`.
Diffstat (limited to 'spec/shared_behaviours')
-rw-r--r--spec/shared_behaviours/all_parsedfile_providers.rb8
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