diff options
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/acceptance/tests/create_spec.rb | 4 | ||||
| -rw-r--r-- | spec/acceptance/tests/modify_spec.rb | 4 | ||||
| -rw-r--r-- | spec/shared_behaviours/all_parsedfile_providers.rb | 2 | ||||
| -rw-r--r-- | spec/unit/type/host_spec.rb | 8 | 
4 files changed, 9 insertions, 9 deletions
| diff --git a/spec/acceptance/tests/create_spec.rb b/spec/acceptance/tests/create_spec.rb index 40267fd..f79452d 100644 --- a/spec/acceptance/tests/create_spec.rb +++ b/spec/acceptance/tests/create_spec.rb @@ -13,7 +13,7 @@ RSpec.context 'when creating host files' do          on(agent, puppet_resource('host', 'test', 'ensure=present',                                    'ip=127.0.0.1', "target=#{target}"))          on(agent, "cat #{target}") do |result| -          fail_test 'record was not present' if result.stdout !~ %r{^127\.0\.0\.1[[:space:]]+test} +          fail_test 'record was not present' unless %r{^127\.0\.0\.1[[:space:]]+test}.match?(result.stdout)          end        end @@ -23,7 +23,7 @@ RSpec.context 'when creating host files' do          on(agent, "cat #{target}") do |result|            fail_test 'alias was missing' unless -            result.stdout =~ %r{^127\.0\.0\.7[[:space:]]+test[[:space:]]alias} +            %r{^127\.0\.0\.7[[:space:]]+test[[:space:]]alias}.match?(result.stdout)          end        end diff --git a/spec/acceptance/tests/modify_spec.rb b/spec/acceptance/tests/modify_spec.rb index 6498ee0..d07bb23 100644 --- a/spec/acceptance/tests/modify_spec.rb +++ b/spec/acceptance/tests/modify_spec.rb @@ -16,7 +16,7 @@ RSpec.context 'when modifying host files' do          on(agent, "cat #{target}") do |result|            fail_test 'the address was not updated' unless -            result.stdout =~ %r{^127\.0\.0\.10[[:space:]]+test[[:space:]]+alias[[:space:]]*$} +            %r{^127\.0\.0\.10[[:space:]]+test[[:space:]]+alias[[:space:]]*$}.match?(result.stdout)          end        end @@ -27,7 +27,7 @@ RSpec.context 'when modifying host files' do          on(agent, "cat #{target}") do |result|            fail_test 'the alias was not updated' unless -            result.stdout =~ %r{^127\.0\.0\.8[[:space:]]+test[[:space:]]+banzai[[:space:]]*$} +            %r{^127\.0\.0\.8[[:space:]]+test[[:space:]]+banzai[[:space:]]*$}.match?(result.stdout)          end        end      end diff --git a/spec/shared_behaviours/all_parsedfile_providers.rb b/spec/shared_behaviours/all_parsedfile_providers.rb index 1701fe3..321cd86 100644 --- a/spec/shared_behaviours/all_parsedfile_providers.rb +++ b/spec/shared_behaviours/all_parsedfile_providers.rb @@ -4,7 +4,7 @@ shared_examples_for 'all parsedfile providers' do |provider, *files|    end    files.flatten.each do |file| -    it "should rewrite #{file} reasonably unchanged" do +    it "rewrites #{file} reasonably unchanged" do        allow(provider).to receive(:default_target).and_return(file)        provider.prefetch diff --git a/spec/unit/type/host_spec.rb b/spec/unit/type/host_spec.rb index 54d9b75..3fa5985 100644 --- a/spec/unit/type/host_spec.rb +++ b/spec/unit/type/host_spec.rb @@ -12,13 +12,13 @@ describe Puppet::Type.type(:host) do    describe 'when validating attributes' do      [:name, :provider].each do |param| -      it "should have a #{param} parameter" do +      it "has a #{param} parameter" do          expect(described_class.attrtype(param)).to eq(:param)        end      end      [:ip, :target, :host_aliases, :comment, :ensure].each do |property| -      it "should have a #{property} property" do +      it "has a #{property} property" do          expect(described_class.attrtype(property)).to eq(:property)        end      end @@ -256,7 +256,7 @@ describe Puppet::Type.type(:host) do       '0:a:b:c:d:e:f::',       '::0:a:b:c:d:e:f', # syntactically correct, but bad form (::0:... could be combined)       'a:b:c:d:e:f:0::'].each do |ip| -      it "should accept #{ip.inspect} as an IPv6 address" do +      it "accepts #{ip.inspect} as an IPv6 address" do          expect { described_class.new(name: 'foo', ip: ip) }.not_to raise_error        end      end @@ -587,7 +587,7 @@ describe Puppet::Type.type(:host) do       '1111::3333:4444:5555:6666:7777:8888:',       '::3333:4444:5555:6666:7777:8888:',       '::2222:3333:4444:5555:6666:7777:8888:'].each do |ip| -      it "should reject #{ip.inspect} as an IPv6 address" do +      it "rejects #{ip.inspect} as an IPv6 address" do          expect { described_class.new(name: 'foo', ip: ip) }.to raise_error(Puppet::ResourceError, %r{Parameter ip failed})        end      end | 
