Skip to content

Commit 2d78851

Browse files
committed
(CONT-801) Unsafe autocorrect RSpec/BeEq
1 parent 18a8332 commit 2d78851

File tree

92 files changed

+95
-100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+95
-100
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,6 @@ Performance/CollectionLiteralInLoop:
9696
Exclude:
9797
- 'lib/puppet/functions/ensure_packages.rb'
9898

99-
# Offense count: 95
100-
# This cop supports unsafe autocorrection (--autocorrect-all).
101-
RSpec/BeEq:
102-
Enabled: false
103-
10499
# Offense count: 36
105100
# Configuration parameters: Prefixes, AllowedPatterns.
106101
# Prefixes: when, with, without

spec/functions/any2array_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'any2array' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_return([]) }
88
it { is_expected.to run.with_params('').and_return([]) }
99
it { is_expected.to run.with_params(true).and_return([true]) }

spec/functions/any2bool_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'any2bool' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
88

99
it { is_expected.to run.with_params(true).and_return(true) }

spec/functions/base64_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'base64' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError) }
88
it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError) }
99
it { is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError, %r{first argument must be one of}) }

spec/functions/basename_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'basename' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{No arguments given}) }
88
it { is_expected.to run.with_params('one', 'two', 'three').and_raise_error(Puppet::ParseError, %r{Too many arguments given}) }
99
it { is_expected.to run.with_params([]).and_raise_error(Puppet::ParseError, %r{Requires string as first argument}) }

spec/functions/batch_escape_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'batch_escape' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77

88
describe 'signature validation' do
99
it { is_expected.to run.with_params.and_raise_error(ArgumentError, %r{'batch_escape' expects 1 argument, got none}) }

spec/functions/bool2num_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'bool2num' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError) }
88

99
[true, 'true', 't', '1', 'y', 'yes', AlsoString.new('true')].each do |truthy|

spec/functions/bool2str_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'bool2str' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError) }
88

99
['true', 'false', nil, :undef, ''].each do |invalid|

spec/functions/clamp_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'clamp' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(ArgumentError, %r{Wrong number of arguments}) }
88
it { is_expected.to run.with_params([]).and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }
99
it { is_expected.to run.with_params(12, 88, 71, 190).and_raise_error(Puppet::ParseError, %r{Wrong number of arguments, need three to clamp}) }

spec/functions/concat_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'concat' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }
88
it { is_expected.to run.with_params([1]).and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }
99
it { is_expected.to run.with_params(1, [2]).and_raise_error(Puppet::ParseError, %r{Requires array}) }

spec/functions/convert_base_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'convert_base' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(ArgumentError) }
88
it { is_expected.to run.with_params('asdf').and_raise_error(ArgumentError) }
99
it { is_expected.to run.with_params('asdf', 'moo', 'cow').and_raise_error(ArgumentError) }

spec/functions/count_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'count' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(ArgumentError) }
88
it { is_expected.to run.with_params('one').and_raise_error(ArgumentError) }
99
it { is_expected.to run.with_params('one', 'two').and_return(1) }

spec/functions/crc32_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
describe 'stdlib::crc32' do
66
context 'when default' do
7-
it { is_expected.not_to eq(nil) }
7+
it { is_expected.not_to be_nil }
88
it { is_expected.to run.with_params.and_raise_error(ArgumentError, %r{stdlib::crc32}) }
99
end
1010

spec/functions/delete_at_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'delete_at' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }
88
it { is_expected.to run.with_params('one', 1).and_raise_error(Puppet::ParseError, %r{Requires array}) }
99
it { is_expected.to run.with_params(1, 1).and_raise_error(Puppet::ParseError, %r{Requires array}) }

spec/functions/delete_regex_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'delete_regex' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }
88
it { is_expected.to run.with_params([]).and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }
99
it { is_expected.to run.with_params([], 'two') }

spec/functions/delete_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'delete' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }
88
it { is_expected.to run.with_params([]).and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }
99
it { is_expected.to run.with_params([], 'two') }

spec/functions/delete_undef_values_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
describe 'delete_undef_values' do
66
let(:is_puppet_6) { Puppet::Util::Package.versioncmp(Puppet.version, '6.0.0') == 0 }
77

8-
it { is_expected.not_to eq(nil) }
8+
it { is_expected.not_to be_nil }
99
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }
1010
it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, %r{expected an array or hash}) }
1111
it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError, %r{expected an array or hash}) }

spec/functions/delete_values_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'delete_values' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }
88
it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }
99
it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }

spec/functions/deprecation_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
Puppet.settings[:strict] = :warning
1515
end
1616

17-
it { is_expected.not_to eq(nil) }
17+
it { is_expected.not_to be_nil }
1818
it { is_expected.to run.with_params.and_raise_error(ArgumentError) }
1919

2020
it 'displays a single warning' do
@@ -66,7 +66,7 @@
6666
ENV['STDLIB_LOG_DEPRECATIONS'] = 'true'
6767
end
6868

69-
it { is_expected.not_to eq(nil) }
69+
it { is_expected.not_to be_nil }
7070
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
7171

7272
it 'displays a single warning' do

spec/functions/difference_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'difference' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }
88
it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError, %r{Wrong number of arguments}) }
99
it { is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError, %r{Requires 2 arrays}) }

spec/functions/dirname_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'dirname' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{No arguments given}) }
88
it { is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError, %r{Too many arguments given}) }
99
it { is_expected.to run.with_params([]).and_raise_error(Puppet::ParseError, %r{Requires string as argument}) }

spec/functions/dos2unix_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
describe 'dos2unix' do
66
context 'when checking parameter validity' do
7-
it { is_expected.not_to eq(nil) }
7+
it { is_expected.not_to be_nil }
88

99
it do
1010
expect(subject).to run.with_params.and_raise_error(ArgumentError, %r{Wrong number of arguments})

spec/functions/ensure_packages_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'ensure_packages' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params('packagename') }
88
it { is_expected.to run.with_params(['packagename1', 'packagename2']) }
99

spec/functions/ensure_resource_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'ensure_resource' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(ArgumentError, %r{Must specify a type}) }
88
it { is_expected.to run.with_params('type').and_raise_error(ArgumentError, %r{Must specify a title}) }
99

spec/functions/ensure_resources_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'ensure_resources' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(ArgumentError, %r{Must specify a type}) }
88
it { is_expected.to run.with_params('type').and_raise_error(ArgumentError, %r{Must specify a title}) }
99

spec/functions/extname_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'stdlib::extname' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(ArgumentError, %r{'stdlib::extname' expects 1 argument, got none}) }
88
it { is_expected.to run.with_params('one', 'two').and_raise_error(ArgumentError, %r{'stdlib::extname' expects 1 argument, got 2}) }
99
it { is_expected.to run.with_params([]).and_raise_error(ArgumentError, %r{'stdlib::extname' parameter 'filename' expects a String value, got Array}) }

spec/functions/fqdn_rand_string_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
describe 'fqdn_rand_string' do
66
let(:default_charset) { %r{\A[a-zA-Z0-9]{100}\z} }
77

8-
it { is_expected.not_to eq(nil) }
8+
it { is_expected.not_to be_nil }
99
it { is_expected.to run.with_params.and_raise_error(ArgumentError, %r{expects at least 1 argument, got none}i) }
1010
it { is_expected.to run.with_params(0).and_raise_error(ArgumentError, %r{parameter 'length' expects an Integer\[1\] value, got Integer\[0, 0\]}) }
1111
it { is_expected.to run.with_params(1.5).and_raise_error(ArgumentError, %r{parameter 'length' expects an Integer\ value, got Float}) }

spec/functions/fqdn_rotate_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'fqdn_rotate' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
88
it { is_expected.to run.with_params(0).and_raise_error(Puppet::ParseError, %r{Requires either array or string to work with}) }
99
it { is_expected.to run.with_params({}).and_raise_error(Puppet::ParseError, %r{Requires either array or string to work with}) }

spec/functions/get_module_path_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'get_module_path' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{Wrong number of arguments, expects one}) }
88
it { is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError, %r{Wrong number of arguments, expects one}) }
99
it { is_expected.to run.with_params('one', 'two', 'three').and_raise_error(Puppet::ParseError, %r{Wrong number of arguments, expects one}) }

spec/functions/getparam_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'getparam' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(ArgumentError, %r{Must specify a reference}) }
88
it { is_expected.to run.with_params('User[one]').and_raise_error(ArgumentError, %r{Must specify name of a parameter}) }
99
it { is_expected.to run.with_params('User[one]', 2).and_raise_error(ArgumentError, %r{Must specify name of a parameter}) }

spec/functions/glob_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'glob' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError) }
88
it { is_expected.to run.with_params(1).and_raise_error(Puppet::ParseError) }
99
it { is_expected.to run.with_params('').and_return([]) }

spec/functions/grep_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'grep' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
88
it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
99

spec/functions/has_interface_with_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'has_interface_with' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(ArgumentError, %r{expects between 1 and 2 arguments, got none}) }
88
it { is_expected.to run.with_params('one', 'two', 'three').and_raise_error(ArgumentError, %r{expects between 1 and 2 arguments, got 3}) }
99

spec/functions/has_ip_address_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'has_ip_address' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
88
it { is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
99

spec/functions/has_ip_network_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'has_ip_network' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
88
it { is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
99

spec/functions/intersection_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'intersection' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError) }
88
it { is_expected.to run.with_params('one').and_raise_error(Puppet::ParseError) }
99
it { is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError) }

spec/functions/ip_in_range_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
describe 'stdlib::ip_in_range' do
66
describe 'signature validation' do
7-
it { is_expected.not_to eq(nil) }
7+
it { is_expected.not_to be_nil }
88
it { is_expected.to run.with_params.and_raise_error(ArgumentError, %r{'stdlib::ip_in_range' expects 2 arguments, got none}) }
99
it { is_expected.to run.with_params('one', 'two', '3').and_raise_error(ArgumentError, %r{'stdlib::ip_in_range' expects 2 arguments, got 3}) }
1010
it { is_expected.to run.with_params([], []).and_raise_error(ArgumentError, %r{'stdlib::ip_in_range' parameter 'ipaddress' expects a String value, got Array}) }

spec/functions/is_a_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
if ENV['FUTURE_PARSER'] == 'yes'
66
describe 'type_of' do
77
pending 'teach rspec-puppet to load future-only functions under 3.7.5' do
8-
it { is_expected.not_to eq(nil) }
8+
it { is_expected.not_to be_nil }
99
end
1010
end
1111
end
1212

1313
if Puppet.version.to_f >= 4.0
1414
describe 'is_a' do
15-
it { is_expected.not_to eq(nil) }
15+
it { is_expected.not_to be_nil }
1616
it { is_expected.to run.with_params.and_raise_error(ArgumentError) }
1717
it { is_expected.to run.with_params('', '').and_raise_error(ArgumentError) }
1818

spec/functions/join_keys_to_values_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'join_keys_to_values' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{Takes exactly two arguments}) }
88
it { is_expected.to run.with_params({}, '', '').and_raise_error(Puppet::ParseError, %r{Takes exactly two arguments}) }
99
it { is_expected.to run.with_params('one', '').and_raise_error(TypeError, %r{The first argument must be a hash}) }

spec/functions/load_module_metadata_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'load_module_metadata' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
88
it { is_expected.to run.with_params('one', 'two', 'three').and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) }
99

spec/functions/loadjson_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'loadjson' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(ArgumentError, %r{wrong number of arguments}i) }
88

99
describe 'when calling with valid arguments' do

spec/functions/loadyaml_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'spec_helper'
44

55
describe 'loadyaml' do
6-
it { is_expected.not_to eq(nil) }
6+
it { is_expected.not_to be_nil }
77
it { is_expected.to run.with_params.and_raise_error(ArgumentError, %r{wrong number of arguments}i) }
88

99
context 'when a non-existing file is specified' do

0 commit comments

Comments
 (0)