diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index a91ff658c..fd9b1c647 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2023-05-30 09:17:22 UTC using RuboCop version 1.50.2. +# on 2024-01-08 14:04:43 UTC using RuboCop version 1.59.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -61,6 +61,7 @@ Lint/ShadowingOuterLocalVariable: - 'lib/beaker/perf.rb' # Offense count: 12 +# This cop supports unsafe autocorrection (--autocorrect-all). Lint/UselessAssignment: Exclude: - 'acceptance/tests/base/dsl/helpers/host_helpers/curl_with_retries_test.rb' @@ -107,6 +108,7 @@ Naming/HeredocDelimiterNaming: - 'spec/beaker/test_case_spec.rb' # Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyleForLeadingUnderscores. # SupportedStylesForLeadingUnderscores: disallowed, required, optional Naming/MemoizedInstanceVariableName: @@ -128,14 +130,18 @@ RSpec/AnyInstance: - 'spec/beaker/host/windows/file_spec.rb' - 'spec/beaker/subcommand_spec.rb' -# Offense count: 12 +# Offense count: 30 # This cop supports unsafe autocorrection (--autocorrect-all). RSpec/BeEq: Exclude: - 'spec/beaker/cli_spec.rb' + - 'spec/beaker/dsl/roles_spec.rb' - 'spec/beaker/host/pswindows/file_spec.rb' - 'spec/beaker/host/windows/exec_spec.rb' - 'spec/beaker/host_spec.rb' + - 'spec/beaker/shared/semvar_spec.rb' + - 'spec/beaker/subcommand/subcommand_util_spec.rb' + - 'spec/beaker/test_suite_spec.rb' # Offense count: 121 # Configuration parameters: Prefixes, AllowedPatterns. @@ -143,7 +149,13 @@ RSpec/BeEq: RSpec/ContextWording: Enabled: false -# Offense count: 239 +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +RSpec/Eq: + Exclude: + - 'spec/beaker/logger_spec.rb' + +# Offense count: 241 # Configuration parameters: CountAsOne. RSpec/ExampleLength: Max: 44 @@ -201,7 +213,7 @@ RSpec/MultipleDescribes: RSpec/MultipleMemoizedHelpers: Max: 18 -# Offense count: 500 +# Offense count: 502 # Configuration parameters: EnforcedStyle, IgnoreSharedExamples. # SupportedStyles: always, named_only RSpec/NamedSubject: @@ -218,6 +230,20 @@ RSpec/NoExpectationExample: - 'spec/beaker/logger_spec.rb' - 'spec/beaker/options/subcommand_options_parser_spec.rb' +# Offense count: 60 +# This cop supports unsafe autocorrection (--autocorrect-all). +RSpec/ReceiveMessages: + Exclude: + - 'spec/beaker/cli_spec.rb' + - 'spec/beaker/command_spec.rb' + - 'spec/beaker/host_prebuilt_steps_spec.rb' + - 'spec/beaker/host_spec.rb' + - 'spec/beaker/options/parser_spec.rb' + - 'spec/beaker/shared/error_handler_spec.rb' + - 'spec/beaker/subcommand_spec.rb' + - 'spec/beaker/test_suite_spec.rb' + - 'spec/helpers.rb' + # Offense count: 7 RSpec/RepeatedDescription: Exclude: @@ -231,6 +257,26 @@ RSpec/RepeatedExample: - 'spec/beaker/dsl/roles_spec.rb' - 'spec/beaker/logger_spec.rb' +# Offense count: 13 +# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata. +# Include: **/*_spec.rb +RSpec/SpecFilePathFormat: + Exclude: + - '**/spec/routing/**/*' + - 'spec/beaker/dsl/assertions_spec.rb' + - 'spec/beaker/dsl/helpers/host_helpers_spec.rb' + - 'spec/beaker/dsl/helpers/test_helpers_spec.rb' + - 'spec/beaker/dsl/helpers/web_helpers_spec.rb' + - 'spec/beaker/dsl/outcomes_spec.rb' + - 'spec/beaker/dsl/roles_spec.rb' + - 'spec/beaker/dsl/structure_spec.rb' + - 'spec/beaker/dsl/wrappers_spec.rb' + - 'spec/beaker/host/mac/group_spec.rb' + - 'spec/beaker/host/mac/user_spec.rb' + - 'spec/beaker/host/pswindows/user_spec.rb' + - 'spec/beaker/host/windows/user_spec.rb' + - 'spec/beaker/host_prebuilt_steps_spec.rb' + # Offense count: 178 RSpec/SubjectStub: Exclude: @@ -283,7 +329,7 @@ Security/Open: Exclude: - 'lib/beaker/dsl/helpers/web_helpers.rb' -# Offense count: 104 +# Offense count: 106 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns. # URISchemes: http, https diff --git a/acceptance/tests/base/dsl/helpers/host_helpers/on_test.rb b/acceptance/tests/base/dsl/helpers/host_helpers/on_test.rb index 257bfe5d9..421f70c54 100644 --- a/acceptance/tests/base/dsl/helpers/host_helpers/on_test.rb +++ b/acceptance/tests/base/dsl/helpers/host_helpers/on_test.rb @@ -150,6 +150,6 @@ tmp.blah end end - assert(Time.now > start + 1) + assert_operator(Time.now, :>, start + 1) end end diff --git a/acceptance/tests/base/dsl/platform_tag_confiner_test.rb b/acceptance/tests/base/dsl/platform_tag_confiner_test.rb index ccedd51f5..5e891fc43 100644 --- a/acceptance/tests/base/dsl/platform_tag_confiner_test.rb +++ b/acceptance/tests/base/dsl/platform_tag_confiner_test.rb @@ -13,7 +13,7 @@ end step "#{pstc_method_name} can remove hosts from a test, or be skipped if empty" do - assert hosts.length > 0, "#{pstc_method_name} did not have enough hosts to test" + assert_operator hosts.length, :>, 0, "#{pstc_method_name} did not have enough hosts to test" previous_hosts = hosts.dup options[:platform_tag_confines] = [ @@ -35,7 +35,7 @@ # is being raised confirms that a lower number of hosts are coming out of # the confine (0) than came in (>0, according to our pre-condition assertion) else - assert hosts.length < previous_hosts.length, "#{pstc_method_name} did not change hosts array" + assert_operator hosts.length, :<, previous_hosts.length, "#{pstc_method_name} did not change hosts array" end # cleanup diff --git a/beaker.gemspec b/beaker.gemspec index 53cbf676a..1f66212f3 100644 --- a/beaker.gemspec +++ b/beaker.gemspec @@ -22,7 +22,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'fakefs', '~> 2.4' s.add_development_dependency 'rake', '~> 13.0' s.add_development_dependency 'rspec', '~> 3.0' - s.add_development_dependency 'voxpupuli-rubocop', '~> 2.0.0' + s.add_development_dependency 'voxpupuli-rubocop', '~> 2.3.0' # Run time dependencies s.add_runtime_dependency 'minitar', '~> 0.6' diff --git a/lib/beaker/shared/host_manager.rb b/lib/beaker/shared/host_manager.rb index 4448515cc..1e4f37581 100644 --- a/lib/beaker/shared/host_manager.rb +++ b/lib/beaker/shared/host_manager.rb @@ -1,10 +1,10 @@ module Beaker module Shared # Methods for managing Hosts. - #- selecting hosts by role (Symbol or String) - #- selecting hosts by name (String) - #- adding additional method definitions for selecting by role - #- executing blocks of code against selected sets of hosts + # - selecting hosts by role (Symbol or String) + # - selecting hosts by name (String) + # - adding additional method definitions for selecting by role + # - executing blocks of code against selected sets of hosts module HostManager # Find hosts from a given array of hosts that all have the desired role. # @param [Array] hosts The hosts to examine diff --git a/lib/beaker/ssh_connection.rb b/lib/beaker/ssh_connection.rb index 41b978cbf..5f348b4fe 100644 --- a/lib/beaker/ssh_connection.rb +++ b/lib/beaker/ssh_connection.rb @@ -104,10 +104,10 @@ def connect options = {} # Try each method in turn until we succeed methods = @ssh_connection_preference.dup while (not @ssh) && (not methods.empty?) - if instance_variable_get("@#{methods[0]}").nil? + if instance_variable_get(:"@#{methods[0]}").nil? @logger.warn "Skipping #{methods[0]} method to ssh to host as its value is not set. Refer to https://github.com/puppetlabs/beaker/tree/master/docs/how_to/ssh_connection_preference.md to remove this warning" elsif SUPPORTED_CONNECTION_METHODS.include?(methods[0]) - @ssh = connect_block(instance_variable_get("@#{methods[0]}"), @user, @ssh_opts, options) + @ssh = connect_block(instance_variable_get(:"@#{methods[0]}"), @user, @ssh_opts, options) else @logger.warn "Beaker does not support #{methods[0]} to SSH to host, trying next available method." @ssh_connection_preference.delete(methods[0]) diff --git a/spec/beaker/cli_spec.rb b/spec/beaker/cli_spec.rb index eb93f197b..b5909230b 100644 --- a/spec/beaker/cli_spec.rb +++ b/spec/beaker/cli_spec.rb @@ -160,9 +160,9 @@ module Beaker expect(cli).to receive(:run_suite).twice expect { cli.execute! }.to raise_error - expect(cli.instance_variable_get(:@attribution)[:logger]).to be == 'runtime' - expect(cli.instance_variable_get(:@attribution)[:timestamp]).to be == 'runtime' - expect(cli.instance_variable_get(:@attribution)[:beaker_version]).to be == 'runtime' + expect(cli.instance_variable_get(:@attribution)[:logger]).to eq 'runtime' + expect(cli.instance_variable_get(:@attribution)[:timestamp]).to eq 'runtime' + expect(cli.instance_variable_get(:@attribution)[:beaker_version]).to eq 'runtime' end it 'continues testing after failed test if using slow fail_mode' do @@ -362,10 +362,10 @@ module Beaker preserved_file = cli.preserve_hosts_file hosts_yaml = load_yaml_file(preserved_file) - expect(hosts_yaml['CONFIG'][:tests]).to be == [] - expect(hosts_yaml['CONFIG'][:pre_suite]).to be == [] - expect(hosts_yaml['CONFIG'][:post_suite]).to be == [] - expect(hosts_yaml['CONFIG'][:pre_cleanup]).to be == [] + expect(hosts_yaml['CONFIG'][:tests]).to eq [] + expect(hosts_yaml['CONFIG'][:pre_suite]).to eq [] + expect(hosts_yaml['CONFIG'][:post_suite]).to eq [] + expect(hosts_yaml['CONFIG'][:pre_cleanup]).to eq [] end end @@ -541,7 +541,7 @@ module Beaker command_correct = "p --log-level debug --hosts #{new_hosts_file} jam --jankies --flag-business" answer = cli.build_hosts_preserved_reproducing_command(command_to_sub, new_hosts_file) - expect(answer).to be_start_with(command_correct) + expect(answer).to start_with(command_correct) end it 'doesn\'t replace an entry if no --hosts key is found' do @@ -549,7 +549,7 @@ module Beaker command_correct = 'p --log-level debug johnnypantaloons7 --jankies --flag-business' answer = cli.build_hosts_preserved_reproducing_command(command_to_sub, 'john/deer/plans.txt') - expect(answer).to be_start_with(command_correct) + expect(answer).to start_with(command_correct) end it 'removes any old --provision flags' do @@ -557,7 +557,7 @@ module Beaker command_correct = 'jam --jankies --flag-business' answer = cli.build_hosts_preserved_reproducing_command(command_to_sub, 'can/talk/to/pigs.yml') - expect(answer).to be_start_with(command_correct) + expect(answer).to start_with(command_correct) end it 'removes any old --no-provision flags' do @@ -565,7 +565,7 @@ module Beaker command_correct = 'jam --jankoos --flag-businesses' answer = cli.build_hosts_preserved_reproducing_command(command_to_sub, 'can/talk/to/bears.yml') - expect(answer).to be_start_with(command_correct) + expect(answer).to start_with(command_correct) end end end diff --git a/spec/beaker/command_spec.rb b/spec/beaker/command_spec.rb index f95bf52ab..d62bcd2d0 100644 --- a/spec/beaker/command_spec.rb +++ b/spec/beaker/command_spec.rb @@ -19,12 +19,12 @@ module Beaker @args = %w[to the baz] @options = { :foo => 'bar' } - expect(cmd.options).to be == @options - expect(cmd.args).to be == @args - expect(cmd.command).to be == @command + expect(cmd.options).to eq @options + expect(cmd.args).to eq @args + expect(cmd.command).to eq @command - expect(cmd.args_string).to be == 'to the baz' - expect(cmd.options_string).to be == '--foo=bar' + expect(cmd.args_string).to eq 'to the baz' + expect(cmd.options_string).to eq '--foo=bar' end describe '#:prepend_cmds' do @@ -35,7 +35,7 @@ module Beaker allow(host).to receive(:prepend_commands).and_return('aloha!') allow(host).to receive(:append_commands).and_return('') - expect(cmd.cmd_line(host)).to be == "aloha! /usr/bin/blah --foo=bar to the baz" + expect(cmd.cmd_line(host)).to eq "aloha! /usr/bin/blah --foo=bar to the baz" end it 'can handle no prepend_cmds' do @@ -45,7 +45,7 @@ module Beaker allow(host).to receive(:prepend_commands).and_return('') allow(host).to receive(:append_commands).and_return('') - expect(cmd.cmd_line(host)).to be == "/usr/bin/blah --foo=bar to the baz" + expect(cmd.cmd_line(host)).to eq "/usr/bin/blah --foo=bar to the baz" end end @@ -57,7 +57,7 @@ module Beaker allow(host).to receive(:prepend_commands).and_return('aloha!') allow(host).to receive(:append_commands).and_return('moo cow') - expect(cmd.cmd_line(host)).to be == "aloha! /usr/bin/blah --foo=bar to the baz moo cow" + expect(cmd.cmd_line(host)).to eq "aloha! /usr/bin/blah --foo=bar to the baz moo cow" end it 'can handle no append_cmds' do @@ -67,7 +67,7 @@ module Beaker allow(host).to receive(:prepend_commands).and_return('') allow(host).to receive(:append_commands).and_return('') - expect(cmd.cmd_line(host)).to be == "/usr/bin/blah --foo=bar to the baz" + expect(cmd.cmd_line(host)).to eq "/usr/bin/blah --foo=bar to the baz" end end @@ -85,7 +85,7 @@ module Beaker describe '#args_string' do it 'joins an array' do subject.args = ['my/command and', nil, 'its args and opts'] - expect(subject.args_string).to be == 'my/command and its args and opts' + expect(subject.args_string).to eq 'my/command and its args and opts' end end end diff --git a/spec/beaker/dsl/helpers/host_helpers_spec.rb b/spec/beaker/dsl/helpers/host_helpers_spec.rb index 899a05f1e..c058b18b3 100644 --- a/spec/beaker/dsl/helpers/host_helpers_spec.rb +++ b/spec/beaker/dsl/helpers/host_helpers_spec.rb @@ -87,7 +87,7 @@ def logger # This will only get hit if forking processes is supported and at least 2 items are being submitted to run in parallel expect(InParallel::InParallelExecutor).to receive(:_execute_in_parallel).with(any_args).and_call_original.exactly(5).times results = subject.on(hosts, command, { :run_in_parallel => true }) - expect(results).to be == expected + expect(results).to eq expected end it 'delegates to itself for each host passed' do @@ -99,7 +99,7 @@ def logger end results = subject.on(hosts, command) - expect(results).to be == expected + expect(results).to eq expected end context 'upon command completion' do @@ -110,19 +110,19 @@ def logger end it 'returns the result of the action' do - expect(@res).to be == result + expect(@res).to eq result end it 'provides access to stdout' do - expect(@res.stdout).to be == 'stdout' + expect(@res.stdout).to eq 'stdout' end it 'provides access to stderr' do - expect(@res.stderr).to be == 'stderr' + expect(@res.stderr).to eq 'stderr' end it 'provides access to exit_code' do - expect(@res.exit_code).to be == 0 + expect(@res.exit_code).to eq 0 end end @@ -141,19 +141,19 @@ def logger it 'provides access to stdout' do subject.on host, command do |containing_class| - expect(containing_class.stdout).to be == 'stdout' + expect(containing_class.stdout).to eq 'stdout' end end it 'provides access to stderr' do subject.on host, command do |containing_class| - expect(containing_class.stderr).to be == 'stderr' + expect(containing_class.stderr).to eq 'stderr' end end it 'provides access to exit_code' do subject.on host, command do |containing_class| - expect(containing_class.exit_code).to be == 0 + expect(containing_class.exit_code).to eq 0 end end end @@ -203,7 +203,7 @@ def logger expect { subject.retry_on(host, command, opts) }.to raise_error(RuntimeError) end - it 'will return success correctly if it succeeds the first time' do + it 'returns success correctly if it succeeds the first time' do result.stdout = 'stdout' result.stderr = 'stderr' result.exit_code = 0 @@ -220,7 +220,7 @@ def logger expect(result_given.exit_code).to be === 0 end - it 'will return success correctly if it succeeds after failing a few times' do + it 'returns success correctly if it succeeds after failing a few times' do result.stdout = 'stdout' result.stderr = 'stderr' diff --git a/spec/beaker/dsl/roles_spec.rb b/spec/beaker/dsl/roles_spec.rb index 95d85c8b8..7c915a78d 100644 --- a/spec/beaker/dsl/roles_spec.rb +++ b/spec/beaker/dsl/roles_spec.rb @@ -21,13 +21,13 @@ class ClassMixedWithDSLRoles it 'returns an array of hosts that are agents' do @hosts = [agent1, agent2, master] expect(subject).to receive(:hosts).and_return(hosts) - expect(subject.agents).to be == [agent1, agent2, master] + expect(subject.agents).to eq [agent1, agent2, master] end it 'and an empty array when none match' do @hosts = [db, custom] expect(subject).to receive(:hosts).and_return(hosts) - expect(subject.agents).to be == [] + expect(subject.agents).to eq [] end end @@ -35,7 +35,7 @@ class ClassMixedWithDSLRoles it 'returns the master if there is one' do @hosts = [master, agent1] expect(subject).to receive(:hosts).and_return(hosts) - expect(subject.master).to be == master + expect(subject.master).to eq master end it 'raises an error if there is more than one master' do @@ -56,7 +56,7 @@ class ClassMixedWithDSLRoles it 'returns the dashboard if there is one' do @hosts = [a_and_dash, agent1] expect(subject).to receive(:hosts).and_return(hosts) - expect(subject.dashboard).to be == a_and_dash + expect(subject.dashboard).to eq a_and_dash end it 'raises an error if there is more than one dashboard' do @@ -83,7 +83,7 @@ class ClassMixedWithDSLRoles it 'returns the database if there is one' do @hosts = [db, agent1] expect(subject).to receive(:hosts).and_return(hosts) - expect(subject.database).to be == db + expect(subject.database).to eq db end it 'raises an error if there is more than one database' do @@ -108,25 +108,25 @@ class ClassMixedWithDSLRoles describe '#not_controller' do it 'returns true when a host does not have the roles master/database/dashboard' do - expect(subject.not_controller(agent1)).to be == true + expect(subject.not_controller(agent1)).to eq true end it 'returns false when a host has one of the roles master/database/dashboard' do - expect(subject.not_controller(a_and_dash)).to be == false + expect(subject.not_controller(a_and_dash)).to eq false end end describe '#agent_only' do it 'returns true when a host has the single role agent' do - expect(subject.agent_only(agent1)).to be == true + expect(subject.agent_only(agent1)).to eq true end it 'returns false when a host has more than a single role' do - expect(subject.agent_only(a_and_dash)).to be == false + expect(subject.agent_only(a_and_dash)).to eq false end it 'returns false when a host has the role master' do - expect(subject.agent_only(master)).to be == false + expect(subject.agent_only(master)).to eq false end end @@ -328,7 +328,7 @@ class ClassMixedWithDSLRoles it 'returns the default host when one is specified' do @hosts = [db, agent1, agent2, default, master] expect(subject).to receive(:hosts).once.and_return(hosts) - expect(subject.default).to be == default + expect(subject.default).to eq default end it 'raises an error if there is more than one default' do @@ -377,7 +377,7 @@ class ClassMixedWithDSLRoles test_role = "custom_role" subject.add_role_def(test_role) expect(subject).to respond_to test_role - expect(subject.send(test_role)).to be == @hosts[2] + expect(subject.send(test_role)).to eq @hosts[2] subject.class.send(:undef_method, test_role) end @@ -387,7 +387,7 @@ class ClassMixedWithDSLRoles test_role = "custom_role" subject.add_role_def(test_role) expect(subject).to respond_to test_role - expect(subject.send(test_role)).to be == [@hosts[2], @hosts[3]] + expect(subject.send(test_role)).to eq [@hosts[2], @hosts[3]] subject.class.send(:undef_method, test_role) end end @@ -397,8 +397,8 @@ class ClassMixedWithDSLRoles @hosts = [agent1, agent2] # expect( subject ).to receive( :hosts ).and_return( hosts ) expect(subject).to receive(:hosts).twice.and_return(hosts) - expect(subject.any_hosts_as?("agent")).to be == true - expect(subject.any_hosts_as?("custom_role")).to be == false + expect(subject.any_hosts_as?("agent")).to eq true + expect(subject.any_hosts_as?("custom_role")).to eq false end end end diff --git a/spec/beaker/dsl/structure_spec.rb b/spec/beaker/dsl/structure_spec.rb index 99b221ef0..7ee4b0666 100644 --- a/spec/beaker/dsl/structure_spec.rb +++ b/spec/beaker/dsl/structure_spec.rb @@ -370,13 +370,13 @@ class ClassMixedWithDSLStructure it 'returns an empty array if there are no applicable hosts' do hosts = [{ 'thing' => 'foo' }, { 'thing' => 'bar' }] - expect(subject.select_hosts({ 'thing' => 'nope' }, hosts)).to be == [] + expect(subject.select_hosts({ 'thing' => 'nope' }, hosts)).to eq [] end it 'selects hosts that match a list of criteria' do hosts = [{ 'thing' => 'foo' }, { 'thing' => 'bar' }, { 'thing' => 'baz' }] - expect(subject.select_hosts({ :thing => %w[foo baz] }, hosts)).to be == [{ 'thing' => 'foo' }, { 'thing' => 'baz' }] + expect(subject.select_hosts({ :thing => %w[foo baz] }, hosts)).to eq [{ 'thing' => 'foo' }, { 'thing' => 'baz' }] end it 'selects hosts when a passed block returns true' do @@ -396,7 +396,7 @@ class ClassMixedWithDSLStructure selected_hosts = subject.select_hosts 'platform' => 'solaris' do |host| subject.on(host, '/sbin/zonename').stdout.include?(':global') end - expect(selected_hosts).to be == [host1] + expect(selected_hosts).to eq [host1] end end end diff --git a/spec/beaker/host/pswindows/exec_spec.rb b/spec/beaker/host/pswindows/exec_spec.rb index c2b350d65..0c585e607 100644 --- a/spec/beaker/host/pswindows/exec_spec.rb +++ b/spec/beaker/host/pswindows/exec_spec.rb @@ -85,17 +85,17 @@ def to_s let(:host) { { 'pathseparator' => ':' } } it 'returns a blank string if theres no env' do - expect(instance.environment_string({})).to be == '' + expect(instance.environment_string({})).to eq '' end it 'takes an env hash with var_name/value pairs' do expect(instance.environment_string({ :HOME => '/', :http_proxy => 'http://foo' })) - .to be == 'set "HOME=/" && set "http_proxy=http://foo" && set "HTTP_PROXY=http://foo" && ' + .to eq 'set "HOME=/" && set "http_proxy=http://foo" && set "HTTP_PROXY=http://foo" && ' end it 'takes an env hash with var_name/value[Array] pairs' do expect(instance.environment_string({ :LD_PATH => ['/', '/tmp'] })) - .to be == "set \"LD_PATH=/:/tmp\" && " + .to eq "set \"LD_PATH=/:/tmp\" && " end end diff --git a/spec/beaker/host/unix/exec_spec.rb b/spec/beaker/host/unix/exec_spec.rb index e0b022473..42ae75ae0 100644 --- a/spec/beaker/host/unix/exec_spec.rb +++ b/spec/beaker/host/unix/exec_spec.rb @@ -62,17 +62,17 @@ def to_s it 'returns a blank string if theres no env' do expect(instance).not_to receive(:is_powershell?) - expect(instance.environment_string({})).to be == '' + expect(instance.environment_string({})).to eq '' end it 'takes an env hash with var_name/value pairs' do expect(instance.environment_string({ :HOME => '/', :http_proxy => 'http://foo' })) - .to be == 'env HOME="/" http_proxy="http://foo" HTTP_PROXY="http://foo"' + .to eq 'env HOME="/" http_proxy="http://foo" HTTP_PROXY="http://foo"' end it 'takes an env hash with var_name/value[Array] pairs' do expect(instance.environment_string({ :LD_PATH => ['/', '/tmp'] })) - .to be == "env LD_PATH=\"/:/tmp\"" + .to eq "env LD_PATH=\"/:/tmp\"" end end diff --git a/spec/beaker/host/unix/pkg_spec.rb b/spec/beaker/host/unix/pkg_spec.rb index 89dc52052..3e0de03d7 100644 --- a/spec/beaker/host/unix/pkg_spec.rb +++ b/spec/beaker/host/unix/pkg_spec.rb @@ -171,7 +171,7 @@ def exec pkg = 'pkg' expect(Beaker::Command).to receive(:new).with("apt-get install --force-yes -y #{pkg}", [], { :prepend_cmds => nil, :cmdexe => false }).and_return('') expect(instance).to receive(:exec).with('', {}).and_return(generate_result("hello", { :exit_code => 0 })) - expect(instance.install_package(pkg)).to be == "hello" + expect(instance.install_package(pkg)).to eq "hello" end end @@ -180,7 +180,7 @@ def exec pkg = 'fedora_package' expect(Beaker::Command).to receive(:new).with("dnf -y install #{pkg}", [], { :prepend_cmds => nil, :cmdexe => false }).and_return('') expect(instance).to receive(:exec).with('', {}).and_return(generate_result("hello", { :exit_code => 0 })) - expect(instance.install_package(pkg)).to be == "hello" + expect(instance.install_package(pkg)).to eq "hello" end it "uses dnf on amazon-2023" do @@ -188,7 +188,7 @@ def exec pkg = 'amazon_package' expect(Beaker::Command).to receive(:new).with("dnf -y install #{pkg}", [], { :prepend_cmds => nil, :cmdexe => false }).and_return('') expect(instance).to receive(:exec).with('', {}).and_return(generate_result("hello", { :exit_code => 0 })) - expect(instance.install_package(pkg)).to be == "hello" + expect(instance.install_package(pkg)).to eq "hello" end it "uses pacman on archlinux" do @@ -196,7 +196,7 @@ def exec pkg = 'archlinux_package' expect(Beaker::Command).to receive(:new).with("pacman -S --noconfirm #{pkg}", [], { :prepend_cmds => nil, :cmdexe => false }).and_return('') expect(instance).to receive(:exec).with('', {}).and_return(generate_result("hello", { :exit_code => 0 })) - expect(instance.install_package(pkg)).to be == "hello" + expect(instance.install_package(pkg)).to eq "hello" end end @@ -206,7 +206,7 @@ def exec @opts = { 'platform' => platform } expect(Beaker::Command).to receive(:new).with("apt-get purge -y pkg", [], { :prepend_cmds => nil, :cmdexe => false }).and_return('') expect(instance).to receive(:exec).with('', {}).and_return(generate_result("hello", { :exit_code => 0 })) - expect(instance.uninstall_package('pkg')).to be == "hello" + expect(instance.uninstall_package('pkg')).to eq "hello" end it "uses dnf on fedora" do @@ -214,7 +214,7 @@ def exec pkg = 'fedora_package' expect(Beaker::Command).to receive(:new).with("dnf -y remove #{pkg}", [], { :prepend_cmds => nil, :cmdexe => false }).and_return('') expect(instance).to receive(:exec).with('', {}).and_return(generate_result("hello", { :exit_code => 0 })) - expect(instance.uninstall_package(pkg)).to be == "hello" + expect(instance.uninstall_package(pkg)).to eq "hello" end end end @@ -225,7 +225,7 @@ def exec @opts = { 'platform' => platform } expect(Beaker::Command).to receive(:new).with("apt-get install -o Dpkg::Options::='--force-confold' -y --force-yes pkg", [], { :prepend_cmds => nil, :cmdexe => false }).and_return('') expect(instance).to receive(:exec).with('', {}).and_return(generate_result("hello", { :exit_code => 0 })) - expect(instance.upgrade_package('pkg')).to be == "hello" + expect(instance.upgrade_package('pkg')).to eq "hello" end end end @@ -236,7 +236,7 @@ def exec pkg = 'redhat_package' expect(Beaker::Command).to receive(:new).with("rpm -Uvh #{pkg} ", [], { :prepend_cmds => nil, :cmdexe => false }).and_return('') expect(instance).to receive(:exec).with('', {}).and_return(generate_result("hello", { :exit_code => 0 })) - expect(instance.install_package_with_rpm(pkg)).to be == "hello" + expect(instance.install_package_with_rpm(pkg)).to eq "hello" end it "accepts a package and additional options" do @@ -245,7 +245,7 @@ def exec cmdline_args = '--foo' expect(Beaker::Command).to receive(:new).with("rpm #{cmdline_args} -Uvh #{pkg} ", [], { :prepend_cmds => nil, :cmdexe => false }).and_return('') expect(instance).to receive(:exec).with('', {}).and_return(generate_result("hello", { :exit_code => 0 })) - expect(instance.install_package_with_rpm(pkg, cmdline_args)).to be == "hello" + expect(instance.install_package_with_rpm(pkg, cmdline_args)).to eq "hello" end end @@ -255,7 +255,7 @@ def exec 'https://myproxy.com:3128', 'http://myproxy.com:3128',].each do |url| it "correctly extracts rpm proxy options for #{url}" do - expect(instance.extract_rpm_proxy_options(url)).to be == '--httpproxy myproxy.com --httpport 3128' + expect(instance.extract_rpm_proxy_options(url)).to eq '--httpproxy myproxy.com --httpport 3128' end end diff --git a/spec/beaker/host_spec.rb b/spec/beaker/host_spec.rb index 502072e3f..0a4af7e34 100644 --- a/spec/beaker/host_spec.rb +++ b/spec/beaker/host_spec.rb @@ -256,7 +256,7 @@ module Beaker allow(host).to receive(:exec).and_return(result) expect(Beaker::Command).to receive(:new).with("mkdir -p \"test/test/test\"") - expect(host.mkdir_p('test/test/test')).to be == true + expect(host.mkdir_p('test/test/test')).to eq true end it "does the right thing on a bash host, identified as is_cygwin=nil" do @@ -267,7 +267,7 @@ module Beaker allow(host).to receive(:exec).and_return(result) expect(Beaker::Command).to receive(:new).with("mkdir -p \"test/test/test\"") - expect(host.mkdir_p('test/test/test')).to be == true + expect(host.mkdir_p('test/test/test')).to eq true end it "does the right thing on a non-bash host, identified as is_cygwin=false (powershell)" do @@ -284,26 +284,26 @@ module Beaker "-NoProfile", "-NonInteractive", "-Command New-Item -Path 'test\\test\\test' -ItemType 'directory'",]) - expect(host.mkdir_p('test/test/test')).to be == true + expect(host.mkdir_p('test/test/test')).to eq true end end describe "#touch" do it "generates the right absolute command for a windows host" do @platform = 'windows' - expect(host.touch('touched_file')).to be == "c:\\\\windows\\\\system32\\\\cmd.exe /c echo. 2> touched_file" + expect(host.touch('touched_file')).to eq "c:\\\\windows\\\\system32\\\\cmd.exe /c echo. 2> touched_file" end %w[centos redhat].each do |platform| it "generates the right absolute command for a #{platform} host" do @platform = platform - expect(host.touch('touched_file')).to be == "/bin/touch touched_file" + expect(host.touch('touched_file')).to eq "/bin/touch touched_file" end end it "generates the right absolute command for an osx host" do @platform = 'osx' - expect(host.touch('touched_file')).to be == "/usr/bin/touch touched_file" + expect(host.touch('touched_file')).to eq "/usr/bin/touch touched_file" end end diff --git a/spec/beaker/logger_spec.rb b/spec/beaker/logger_spec.rb index 7d9fe3440..d297db216 100644 --- a/spec/beaker/logger_spec.rb +++ b/spec/beaker/logger_spec.rb @@ -205,11 +205,11 @@ def prefix_log_line_test_compare_helper(in_test, out_answer) let(:logger) { described_class.new(my_io, :quiet => true, :log_colors => log_colors) } it 'overrides the specified log colors' do - expect(logger.log_colors[:error]).to be == Beaker::Logger::BLACK + expect(logger.log_colors[:error]).to eq Beaker::Logger::BLACK end it 'leaves other colors as the default' do - expect(logger.log_colors[:warn]).to be == Beaker::Logger::BRIGHT_RED + expect(logger.log_colors[:warn]).to eq Beaker::Logger::BRIGHT_RED end end @@ -220,11 +220,11 @@ def prefix_log_line_test_compare_helper(in_test, out_answer) context 'when using the default log colors' do it 'overrides notify with NORMAL' do - expect(logger.log_colors[:notify]).to be == Beaker::Logger::NORMAL + expect(logger.log_colors[:notify]).to eq Beaker::Logger::NORMAL end it 'overrides info with NORMAL' do - expect(logger.log_colors[:info]).to be == Beaker::Logger::NORMAL + expect(logger.log_colors[:info]).to eq Beaker::Logger::NORMAL end end @@ -238,15 +238,15 @@ def prefix_log_line_test_compare_helper(in_test, out_answer) let(:logger) { described_class.new(my_io, :quiet => true, :log_colors => log_colors) } it 'overrides the specified log colors' do - expect(logger.log_colors[:error]).to be == Beaker::Logger::BLACK + expect(logger.log_colors[:error]).to eq Beaker::Logger::BLACK end it 'does not override notify with NORMAL' do - expect(logger.log_colors[:notify]).not_to be == Beaker::Logger::NORMAL + expect(logger.log_colors[:notify]).not_to eq Beaker::Logger::NORMAL end it 'does not override info with NORMAL' do - expect(logger.log_colors[:notify]).not_to be == Beaker::Logger::NORMAL + expect(logger.log_colors[:notify]).not_to eq Beaker::Logger::NORMAL end end end diff --git a/spec/beaker/options/hosts_file_parser_spec.rb b/spec/beaker/options/hosts_file_parser_spec.rb index de7e4c1fb..bd5544b06 100644 --- a/spec/beaker/options/hosts_file_parser_spec.rb +++ b/spec/beaker/options/hosts_file_parser_spec.rb @@ -66,7 +66,7 @@ module Options end describe '#parse_hosts_string' do - it 'will return a #new_host_options hash if given no arguments' do + it 'returns a #new_host_options hash if given no arguments' do host_options = parser.parse_hosts_string expect(host_options).to be === parser.new_host_options end diff --git a/spec/beaker/options/parser_spec.rb b/spec/beaker/options/parser_spec.rb index 29994076c..62c282d7b 100644 --- a/spec/beaker/options/parser_spec.rb +++ b/spec/beaker/options/parser_spec.rb @@ -127,10 +127,10 @@ module Options my_args = ['--log-level', 'debug', '-h', hosts_path] expect(parser.parse_args(my_args)[:command_line]).to include(my_args.join(' ')) - expect(parser.attribution[:command_line]).to be == 'cmd' - expect(parser.attribution[:hosts_file]).to be == 'cmd' - expect(parser.attribution[:log_level]).to be == 'cmd' - expect(parser.attribution[:pe_dir]).to be == 'preset' + expect(parser.attribution[:command_line]).to eq 'cmd' + expect(parser.attribution[:hosts_file]).to eq 'cmd' + expect(parser.attribution[:log_level]).to eq 'cmd' + expect(parser.attribution[:pe_dir]).to eq 'preset' end describe 'does prioritization correctly' do @@ -205,8 +205,8 @@ def mock_out_parsing opts = parser.parse_args([]) attribution = parser.attribution - expect(opts[:level]).to be == 'lowest' - expect(attribution[:level]).to be == 'preset' + expect(opts[:level]).to eq 'lowest' + expect(attribution[:level]).to eq 'preset' end it 'project options should have seventh priority' do @@ -215,10 +215,10 @@ def mock_out_parsing opts = parser.parse_args([]) attribution = parser.attribution - expect(opts[:ssh][:auth_methods]).to be == 'auth_project_123' - expect(attribution[:ssh][:auth_methods]).to be == 'project' - expect(opts[:level]).to be == 'seventh' - expect(attribution[:level]).to be == 'project' + expect(opts[:ssh][:auth_methods]).to eq 'auth_project_123' + expect(attribution[:ssh][:auth_methods]).to eq 'project' + expect(opts[:level]).to eq 'seventh' + expect(attribution[:level]).to eq 'project' end it 'home directory options should have sixth priority' do @@ -227,10 +227,10 @@ def mock_out_parsing opts = parser.parse_args([]) attribution = parser.attribution - expect(opts[:ssh][:auth_methods]).to be == 'auth_home_123' - expect(attribution[:ssh][:auth_methods]).to be == 'homedir' - expect(opts[:level]).to be == 'sixth' - expect(attribution[:level]).to be == 'homedir' + expect(opts[:ssh][:auth_methods]).to eq 'auth_home_123' + expect(attribution[:ssh][:auth_methods]).to eq 'homedir' + expect(opts[:level]).to eq 'sixth' + expect(attribution[:level]).to eq 'homedir' end it 'subcommand_options should have fifth priority' do @@ -239,8 +239,8 @@ def mock_out_parsing opts = parser.parse_args([]) attribution = parser.attribution - expect(opts[:level]).to be == 'fifth' - expect(attribution[:level]).to be == 'subcommand' + expect(opts[:level]).to eq 'fifth' + expect(attribution[:level]).to eq 'subcommand' end it 'options file has fourth priority' do @@ -250,16 +250,16 @@ def mock_out_parsing opts = parser.parse_args([]) attribution = parser.attribution expect(attribution[:ssh]).to be_a(Hash) - expect(attribution[:ssh][:auth_methods]).to be == 'options_file' - expect(attribution[:ssh][:user_known_hosts_file]).to be == 'options_file' - expect(attribution[:ssh][:config]).to be == 'preset' - expect(attribution[:ssh][:verify_host_key]).to be == 'preset' - expect(attribution[:ssh][:port]).to be == 'preset' - expect(attribution[:ssh][:forward_agent]).to be == 'preset' - expect(attribution[:ssh][:keys]).to be == 'preset' - expect(attribution[:ssh][:keepalive]).to be == 'preset' - expect(opts[:level]).to be == 'fourth' - expect(attribution[:level]).to be == 'options_file' + expect(attribution[:ssh][:auth_methods]).to eq 'options_file' + expect(attribution[:ssh][:user_known_hosts_file]).to eq 'options_file' + expect(attribution[:ssh][:config]).to eq 'preset' + expect(attribution[:ssh][:verify_host_key]).to eq 'preset' + expect(attribution[:ssh][:port]).to eq 'preset' + expect(attribution[:ssh][:forward_agent]).to eq 'preset' + expect(attribution[:ssh][:keys]).to eq 'preset' + expect(attribution[:ssh][:keepalive]).to eq 'preset' + expect(opts[:level]).to eq 'fourth' + expect(attribution[:level]).to eq 'options_file' end it 'host file CONFIG section has third priority' do @@ -268,8 +268,8 @@ def mock_out_parsing opts = parser.parse_args([]) attribution = parser.attribution - expect(opts[:level]).to be == 'third' - expect(attribution[:level]).to be == 'host_file' + expect(opts[:level]).to eq 'third' + expect(attribution[:level]).to eq 'host_file' end it 'command line arguments have second priority' do @@ -278,8 +278,8 @@ def mock_out_parsing opts = parser.parse_args([]) attribution = parser.attribution - expect(opts[:level]).to be == 'second' - expect(attribution[:level]).to be == 'cmd' + expect(opts[:level]).to eq 'second' + expect(attribution[:level]).to eq 'cmd' end it 'env vars have highest priority' do @@ -287,8 +287,8 @@ def mock_out_parsing opts = parser.parse_args([]) attribution = parser.attribution - expect(opts[:level]).to be == 'highest' - expect(attribution[:level]).to be == 'env' + expect(opts[:level]).to eq 'highest' + expect(attribution[:level]).to eq 'env' end it "loads the options file from a project file" do @@ -325,12 +325,12 @@ def mock_out_parsing args = ["-h", hosts_path, "--log-level", log_level, "--type", type, "--install", "PUPPET/1.0,HIERA/hello"] output = parser.parse_args(args) attribution = parser.attribution - expect(output[:hosts_file]).to be == hosts_path - expect(attribution[:hosts_file]).to be == 'cmd' - expect(output[:jenkins_build_url]).to be == build_url - expect(attribution[:jenkins_build_url]).to be == 'env' + expect(output[:hosts_file]).to eq hosts_path + expect(attribution[:hosts_file]).to eq 'cmd' + expect(output[:jenkins_build_url]).to eq build_url + expect(attribution[:jenkins_build_url]).to eq 'env' expect(output[:install]).to include('git://github.com/puppetlabs/hiera.git#hello') - expect(attribution[:install]).to be == 'runtime' + expect(attribution[:install]).to eq 'runtime' ENV["BUILD_URL"] = old_build_url end @@ -567,20 +567,20 @@ def fake_hosts_file_for_platform(hosts, platform) hosts['HOSTS'][:master][:ssh] = { :user => 'hello' } parser.instance_variable_set(:@options, hosts) parser.normalize_args - expect(hosts['HOSTS'][:master][:user]).to be == 'hello' + expect(hosts['HOSTS'][:master][:user]).to eq 'hello' end it 'uses default user if there is an ssh hash, but no ssh[:user]' do hosts['HOSTS'][:master][:ssh] = { :hello => 'hello' } parser.instance_variable_set(:@options, hosts) parser.normalize_args - expect(hosts['HOSTS'][:master][:user]).to be == 'root' + expect(hosts['HOSTS'][:master][:user]).to eq 'root' end it 'uses default user if no ssh hash' do parser.instance_variable_set(:@options, hosts) parser.normalize_args - expect(hosts['HOSTS'][:master][:user]).to be == 'root' + expect(hosts['HOSTS'][:master][:user]).to eq 'root' end end end diff --git a/spec/beaker/shared/host_manager_spec.rb b/spec/beaker/shared/host_manager_spec.rb index 12ec97f02..dede8f86c 100644 --- a/spec/beaker/shared/host_manager_spec.rb +++ b/spec/beaker/shared/host_manager_spec.rb @@ -140,7 +140,7 @@ module Shared end end - it "will ignore run_in_parallel global option" do + it "ignores run_in_parallel global option" do myhosts = host_handler.run_block_on(hosts, nil, { :run_in_parallel => [] }) do |host| host end diff --git a/spec/beaker/shared/semvar_spec.rb b/spec/beaker/shared/semvar_spec.rb index 1cbbc79de..c033b70e3 100644 --- a/spec/beaker/shared/semvar_spec.rb +++ b/spec/beaker/shared/semvar_spec.rb @@ -57,7 +57,7 @@ module Shared end it 'reports that 2015.3.0 is not less than 2015.3.0' do - expect(subject.version_is_less('2015.3.0', '2015.3.0')).to be == false + expect(subject.version_is_less('2015.3.0', '2015.3.0')).to eq false end end diff --git a/spec/beaker/subcommand/subcommand_util_spec.rb b/spec/beaker/subcommand/subcommand_util_spec.rb index b6474ea26..daa056b66 100644 --- a/spec/beaker/subcommand/subcommand_util_spec.rb +++ b/spec/beaker/subcommand/subcommand_util_spec.rb @@ -57,23 +57,23 @@ module Subcommands describe 'execute_subcommand' do it "determines if we should execute the init subcommand" do - expect(subject.execute_subcommand?("init")).to be == true + expect(subject.execute_subcommand?("init")).to eq true end it "does not attempt to execute intialize as a subcommand" do - expect(subject.execute_subcommand?("initialize")).to be == false + expect(subject.execute_subcommand?("initialize")).to eq false end it "determines if we should execute the help subcommand" do - expect(subject.execute_subcommand?("help")).to be == true + expect(subject.execute_subcommand?("help")).to eq true end it "determines if we should execute the provision subcommand" do - expect(subject.execute_subcommand?("provision")).to be == true + expect(subject.execute_subcommand?("provision")).to eq true end it "determines that a subcommand should not be executed" do - expect(subject.execute_subcommand?("notasubcommand")).to be == false + expect(subject.execute_subcommand?("notasubcommand")).to eq false end end diff --git a/spec/beaker/test_suite_spec.rb b/spec/beaker/test_suite_spec.rb index 4ab5651dc..938bed59e 100644 --- a/spec/beaker/test_suite_spec.rb +++ b/spec/beaker/test_suite_spec.rb @@ -27,14 +27,14 @@ module Beaker @files = [rb_test] ts = described_class.new('name', 'hosts', options, Time.now) tfm = ts.instance_variable_get(:@fail_mode) - expect(tfm).to be == :slow + expect(tfm).to eq :slow end it 'uses provided parameter fail_mode' do @files = [rb_test] ts = described_class.new('name', 'hosts', options, Time.now, :fast) tfm = ts.instance_variable_get(:@fail_mode) - expect(tfm).to be == :fast + expect(tfm).to eq :fast end it 'uses options fail_mode if fail_mode parameter is not provided' do @@ -42,7 +42,7 @@ module Beaker options[:fail_mode] = :fast ts = described_class.new('name', 'hosts', options, Time.now) tfm = ts.instance_variable_get(:@fail_mode) - expect(tfm).to be == :fast + expect(tfm).to eq :fast end end @@ -135,7 +135,7 @@ module Beaker test_suite_result.add_test_case(testcase1) test_suite_result.add_test_case(testcase2) test_suite_result.add_test_case(testcase3) - expect(test_suite_result.passed_tests).to be == 2 + expect(test_suite_result.passed_tests).to eq 2 end it 'calculates failed tests' do @@ -145,7 +145,7 @@ module Beaker test_suite_result.add_test_case(testcase1) test_suite_result.add_test_case(testcase2) test_suite_result.add_test_case(testcase3) - expect(test_suite_result.failed_tests).to be == 1 + expect(test_suite_result.failed_tests).to eq 1 end it 'calculates errored tests' do @@ -155,7 +155,7 @@ module Beaker test_suite_result.add_test_case(testcase1) test_suite_result.add_test_case(testcase2) test_suite_result.add_test_case(testcase3) - expect(test_suite_result.errored_tests).to be == 1 + expect(test_suite_result.errored_tests).to eq 1 end it 'calculates skipped tests' do @@ -165,7 +165,7 @@ module Beaker test_suite_result.add_test_case(testcase1) test_suite_result.add_test_case(testcase2) test_suite_result.add_test_case(testcase3) - expect(test_suite_result.skipped_tests).to be == 1 + expect(test_suite_result.skipped_tests).to eq 1 end it 'calculates pending tests' do @@ -175,7 +175,7 @@ module Beaker test_suite_result.add_test_case(testcase1) test_suite_result.add_test_case(testcase2) test_suite_result.add_test_case(testcase3) - expect(test_suite_result.pending_tests).to be == 1 + expect(test_suite_result.pending_tests).to eq 1 end it 'calculates sum_failed as a sum of errored and failed TestCases' do @@ -185,7 +185,7 @@ module Beaker test_suite_result.add_test_case(testcase1) test_suite_result.add_test_case(testcase2) test_suite_result.add_test_case(testcase3) - expect(test_suite_result.sum_failed).to be == 2 + expect(test_suite_result.sum_failed).to eq 2 end it 'reports success with no errors/failures' do @@ -195,7 +195,7 @@ module Beaker test_suite_result.add_test_case(testcase1) test_suite_result.add_test_case(testcase2) test_suite_result.add_test_case(testcase3) - expect(test_suite_result.success?).to be == false + expect(test_suite_result.success?).to eq false end it 'reports failed if any tests error/fail' do @@ -205,7 +205,7 @@ module Beaker test_suite_result.add_test_case(testcase1) test_suite_result.add_test_case(testcase2) test_suite_result.add_test_case(testcase3) - expect(test_suite_result.failed?).to be == true + expect(test_suite_result.failed?).to eq true end it 'can calculate the sum of all TestCase runtimes' do @@ -215,7 +215,7 @@ module Beaker test_suite_result.add_test_case(testcase1) test_suite_result.add_test_case(testcase2) test_suite_result.add_test_case(testcase3) - expect(test_suite_result.elapsed_time).to be == 111 + expect(test_suite_result.elapsed_time).to eq 111 end describe '#print_test_result' do