diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d3d7aa56ce..46676342d1 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -96,12 +96,6 @@ Lint/ShadowingOuterLocalVariable: Lint/UnusedBlockArgument: Enabled: false -# Offense count: 108 -# Cop supports --auto-correct. -# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods. -Lint/UnusedMethodArgument: - Enabled: false - # Offense count: 60 Metrics/AbcSize: Max: 99 diff --git a/examples/watir/features/support/screenshots.rb b/examples/watir/features/support/screenshots.rb index a824ca01a9..c841a6b935 100644 --- a/examples/watir/features/support/screenshots.rb +++ b/examples/watir/features/support/screenshots.rb @@ -2,7 +2,7 @@ # browser testing. Just run cucumber with --format html --out report.html # # The code below will work on OS X or Windows (with IE Watir only). -# Adding support for other platforms should be easy - as long as there is a +# Adding support for other platforms should be easy - as long as there is a # ruby library or command line tool to take pictures. # module Screenshots @@ -21,7 +21,7 @@ def embed_screenshot(id) end else # Other platforms... - def embed_screenshot(id) + def embed_screenshot(_id) STDERR.puts 'Sorry - no screenshots on your platform yet.' end end diff --git a/lib/cucumber/cli/configuration.rb b/lib/cucumber/cli/configuration.rb index dc6d333e09..bdbee0a7fc 100644 --- a/lib/cucumber/cli/configuration.rb +++ b/lib/cucumber/cli/configuration.rb @@ -121,7 +121,7 @@ def to_hash private class LogFormatter < ::Logger::Formatter - def call(severity, time, progname, msg) + def call(_severity, _time, _progname, msg) msg end end diff --git a/lib/cucumber/deprecate.rb b/lib/cucumber/deprecate.rb index 700cd6e06f..ddce7ac762 100644 --- a/lib/cucumber/deprecate.rb +++ b/lib/cucumber/deprecate.rb @@ -13,7 +13,7 @@ def self.call(message, method, remove_after_version) end module ForDevelopers - def self.call(message, method, remove_after_version) + def self.call(_message, _method, remove_after_version) if Cucumber::VERSION > remove_after_version raise "This method is due for removal after version #{remove_after_version}" end diff --git a/lib/cucumber/formatter/html.rb b/lib/cucumber/formatter/html.rb index 32c9ab12ae..3603778755 100644 --- a/lib/cucumber/formatter/html.rb +++ b/lib/cucumber/formatter/html.rb @@ -116,20 +116,20 @@ def after_features(features) @builder << '' end - def before_feature(feature) + def before_feature(_feature) @exceptions = [] @builder << '
' end - def after_feature(feature) + def after_feature(_feature) @builder << '
' end - def before_comment(comment) + def before_comment(_comment) @builder << '
'
       end
 
-      def after_comment(comment)
+      def after_comment(_comment)
         @builder << '
' end @@ -138,7 +138,7 @@ def comment_line(comment_line) @builder.br end - def after_tags(tags) + def after_tags(_tags) @tag_spacer = nil end @@ -162,21 +162,21 @@ def feature_name(keyword, name) end end - def before_test_case(test_case) + def before_test_case(_test_case) @previous_step_keyword = nil end - def before_background(background) + def before_background(_background) @in_background = true @builder << '
' end - def after_background(background) + def after_background(_background) @in_background = nil @builder << '
' end - def background_name(keyword, name, file_colon_line, source_indent) + def background_name(keyword, name, _file_colon_line, _source_indent) @listing_background = true @builder.h3(:id => "background_#{@scenario_number}") do |h3| @builder.span(keyword, :class => 'keyword') @@ -193,7 +193,7 @@ def before_feature_element(feature_element) @in_scenario_outline = feature_element.class == Cucumber::Core::Ast::ScenarioOutline end - def after_feature_element(feature_element) + def after_feature_element(_feature_element) unless @in_scenario_outline print_messages @builder << '' @@ -202,7 +202,7 @@ def after_feature_element(feature_element) @in_scenario_outline = nil end - def scenario_name(keyword, name, file_colon_line, source_indent) + def scenario_name(keyword, name, file_colon_line, _source_indent) @builder.span(:class => 'scenario_file') do @builder << file_colon_line end @@ -220,23 +220,23 @@ def scenario_name(keyword, name, file_colon_line, source_indent) end end - def before_outline_table(outline_table) + def before_outline_table(_outline_table) @inside_outline = true @outline_row = 0 @builder << '' end - def after_outline_table(outline_table) + def after_outline_table(_outline_table) @builder << '
' @outline_row = nil @inside_outline = false end - def before_examples(examples) + def before_examples(_examples) @builder << '
' end - def after_examples(examples) + def after_examples(_examples) @builder << '
' end @@ -248,11 +248,11 @@ def examples_name(keyword, name) end end - def before_steps(steps) + def before_steps(_steps) @builder << '
    ' end - def after_steps(steps) + def after_steps(_steps) print_messages @builder << '
' if @in_background or @in_scenario_outline end @@ -264,11 +264,11 @@ def before_step(step) @step = step end - def after_step(step) + def after_step(_step) move_progress end - def before_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line) + def before_step_result(_keyword, step_match, _multiline_arg, status, exception, _source_indent, background, _file_colon_line) @step_match = step_match @hide_this_step = false if exception @@ -288,7 +288,7 @@ def before_step_result(keyword, step_match, multiline_arg, status, exception, so @builder << "
  • " end - def after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line) + def after_step_result(keyword, step_match, _multiline_arg, status, _exception, _source_indent, _background, _file_colon_line) return if @hide_this_step # print snippet for undefined steps unless outline_step?(@step) @@ -306,7 +306,7 @@ def after_step_result(keyword, step_match, multiline_arg, status, exception, sou print_messages end - def step_name(keyword, step_match, status, source_indent, background, file_colon_line) + def step_name(keyword, step_match, status, _source_indent, background, _file_colon_line) background_in_scenario = background && !@listing_background @skip_step = background_in_scenario @@ -315,7 +315,7 @@ def step_name(keyword, step_match, status, source_indent, background, file_colon end end - def exception(exception, status) + def exception(exception, _status) return if @hide_this_step print_messages build_exception_detail(exception) @@ -421,7 +421,7 @@ def empty_messages @delayed_messages = [] end - def after_test_case(test_case, result) + def after_test_case(_test_case, result) if result.failed? and not @scenario_red set_scenario_color_failed end @@ -489,7 +489,7 @@ def set_scenario_color_pending end end - def build_step(keyword, step_match, status) + def build_step(keyword, step_match, _status) step_name = step_match.format_args(lambda{|param| %{#{param}}}) @builder.div(:class => 'step_name') do |div| @builder.span(keyword, :class => 'keyword') @@ -605,7 +605,7 @@ def print_stats(features) @builder << "" end - def print_stat_string(features) + def print_stat_string(_features) string = String.new string << dump_count(@runtime.scenarios.length, 'scenario') scenario_count = print_status_counts{|status| @runtime.scenarios(status)} @@ -632,12 +632,12 @@ def create_builder(io) Builder::XmlMarkup.new(:target => io, :indent => 0) end - def outline_step?(step) + def outline_step?(_step) not @step.step.respond_to?(:actual_keyword) end class SnippetExtractor #:nodoc: - class NullConverter; def convert(code, pre); code; end; end #:nodoc: + class NullConverter; def convert(code, _pre); code; end; end #:nodoc: begin require 'syntax/convertors/html' diff --git a/lib/cucumber/formatter/json.rb b/lib/cucumber/formatter/json.rb index 01859bd64d..a8c6e35493 100644 --- a/lib/cucumber/formatter/json.rb +++ b/lib/cucumber/formatter/json.rb @@ -71,7 +71,7 @@ def on_test_case_finished(event) add_failed_around_hook(result) if result.failed? && !@any_step_failed end - def on_test_run_finished(event) + def on_test_run_finished(_event) @io.write(MultiJson.dump(@feature_hashes, pretty: true)) end @@ -197,7 +197,7 @@ def add_failed_around_hook(result) @step_or_hook_hash[:result] = create_result_hash(result) end - def create_match_hash(test_step, result) + def create_match_hash(test_step, _result) { location: test_step.action_location.to_s } end diff --git a/lib/cucumber/formatter/junit.rb b/lib/cucumber/formatter/junit.rb index 2dd2cfc252..69cdfa36ca 100644 --- a/lib/cucumber/formatter/junit.rb +++ b/lib/cucumber/formatter/junit.rb @@ -68,7 +68,7 @@ def on_test_case_finished(event) Interceptor::Pipe.unwrap! :stderr end - def on_test_run_finished(event) + def on_test_run_finished(_event) @features_data.each { |file, data| end_feature(data) } end diff --git a/lib/cucumber/formatter/legacy_api/adapter.rb b/lib/cucumber/formatter/legacy_api/adapter.rb index 7b0b62acae..c94e7f4fd2 100644 --- a/lib/cucumber/formatter/legacy_api/adapter.rb +++ b/lib/cucumber/formatter/legacy_api/adapter.rb @@ -151,7 +151,7 @@ def initialize @result = CaseSource.new end - def method_missing(name, node, test_case_result, *args) + def method_missing(name, node, _test_case_result, *_args) result.send "#{name}=", node end end @@ -175,7 +175,7 @@ def initialize @result = StepSource.new end - def method_missing(name, node, step_result, *args) + def method_missing(name, node, step_result, *_args) result.send "#{name}=", node result.send "#{name}_result=", LegacyResultBuilder.new(step_result) end @@ -220,7 +220,7 @@ def before attr_reader :current_test_step_source - def before_test_case(test_case) + def before_test_case(_test_case) @before_hook_results = Ast::HookResultCollection.new @test_step_results = [] end @@ -258,22 +258,22 @@ def after_test_case(test_case, test_case_result) @previous_test_case_scenario_outline = current_test_step_source && current_test_step_source.scenario_outline end - def before_hook(location, result) + def before_hook(_location, result) @before_hook_results << Ast::HookResult.new(LegacyResultBuilder.new(result), @delayed_messages, @delayed_embeddings) @delayed_messages = [] @delayed_embeddings = [] end - def after_hook(location, result) + def after_hook(_location, result) # if the scenario has no steps, we can hit this before we've created the scenario printer # ideally we should call switch_step_container in before_step_step - switch_step_container if !@child + switch_step_container if !@child @child.after_hook Ast::HookResult.new(LegacyResultBuilder.new(result), @delayed_messages, @delayed_embeddings) @delayed_messages = [] @delayed_embeddings = [] end - def after_step_hook(hook, result) + def after_step_hook(_hook, result) p current_test_step_source if current_test_step_source.step.nil? line = current_test_step_source.step.backtrace_line @child.after_step_hook Ast::HookResult.new(LegacyResultBuilder.new(result). @@ -389,7 +389,7 @@ def switch_to_child(child, source) end end unless from_scenario_outline_to_hidden_backgroud(@child, child) - @child.after + @child.after @previous_outline_child = nil else @previous_outline_child = @child @@ -495,7 +495,7 @@ def get_failed_step_source return @source_of_failed_step end - def step_invocation(step_invocation, source) + def step_invocation(_step_invocation, source) if source.step_result.status == :failed @source_of_failed_step = source end @@ -522,7 +522,7 @@ def before self end - def step_invocation(step_invocation, source) + def step_invocation(step_invocation, _source) @child ||= StepsPrinter.new(formatter).before @child.step_invocation step_invocation end @@ -531,7 +531,7 @@ def after_step_hook(result) result.accept formatter end - def after_test_case(test_case, result) + def after_test_case(_test_case, result) @test_case_result = result after end @@ -636,7 +636,7 @@ def print(node) steps_printer.after end - def scenario_outline(node, &descend) + def scenario_outline(_node, &descend) descend.call(self) end @@ -746,7 +746,7 @@ def examples_table(table, &descend) descend.call(self) end - def examples_table_row(row, &descend) + def examples_table_row(row, &_descend) width = char_length_of(row.values[index]) @result = width if width > result end @@ -771,7 +771,7 @@ def after_step_hook(result) @after_step_hook_result << result end - def after_test_case(*args) + def after_test_case(*_args) after end @@ -999,7 +999,7 @@ def filtered_exception Cucumber::Formatter::BacktraceFilter.new(@exception.dup).exception end - def filtered_step_exception(step) + def filtered_step_exception(_step) exception = filtered_exception return Cucumber::Formatter::BacktraceFilter.new(exception).exception end diff --git a/lib/cucumber/formatter/legacy_api/ast.rb b/lib/cucumber/formatter/legacy_api/ast.rb index 55c0ae1c5e..6d0f349f9d 100644 --- a/lib/cucumber/formatter/legacy_api/ast.rb +++ b/lib/cucumber/formatter/legacy_api/ast.rb @@ -23,7 +23,7 @@ def accept(formatter) # ExampleTableRow#keyword is never called on them, # but this will pass silently if it happens anyway class NullLanguage - def method_missing(*args, &block) + def method_missing(*_args, &_block) self end diff --git a/lib/cucumber/formatter/pretty.rb b/lib/cucumber/formatter/pretty.rb index a8778d0123..65a64cf02b 100644 --- a/lib/cucumber/formatter/pretty.rb +++ b/lib/cucumber/formatter/pretty.rb @@ -36,7 +36,7 @@ def initialize(runtime, path_or_io, options) @issues = ConsoleIssues.new(runtime.configuration) end - def before_features(features) + def before_features(_features) print_profile_information end @@ -44,7 +44,7 @@ def after_features(features) print_summary(features) end - def before_feature(feature) + def before_feature(_feature) @exceptions = [] @indent = 0 end @@ -54,7 +54,7 @@ def comment_line(comment_line) @io.flush end - def after_tags(tags) + def after_tags(_tags) if @indent == 1 @io.puts @io.flush @@ -74,24 +74,24 @@ def feature_name(keyword, name) @io.flush end - def before_feature_element(feature_element) + def before_feature_element(_feature_element) @indent = 2 @scenario_indent = 2 end - def after_feature_element(feature_element) + def after_feature_element(_feature_element) print_messages @io.puts @io.flush end - def before_background(background) + def before_background(_background) @indent = 2 @scenario_indent = 2 @in_background = true end - def after_background(background) + def after_background(_background) print_messages @in_background = nil @io.puts @@ -102,7 +102,7 @@ def background_name(keyword, name, file_colon_line, source_indent) print_feature_element_name(keyword, name, file_colon_line, source_indent) end - def before_examples_array(examples_array) + def before_examples_array(_examples_array) @indent = 4 @io.puts @visiting_first_example_name = true @@ -121,7 +121,7 @@ def before_outline_table(outline_table) @table = outline_table end - def after_outline_table(outline_table) + def after_outline_table(_outline_table) @table = nil @indent = 4 end @@ -136,7 +136,7 @@ def before_step(step) print_messages end - def before_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line) + def before_step_result(_keyword, _step_match, _multiline_arg, status, exception, _source_indent, background, _file_colon_line) @hide_this_step = false if exception if @exceptions.include?(exception) @@ -152,7 +152,7 @@ def before_step_result(keyword, step_match, multiline_arg, status, exception, so @status = status end - def step_name(keyword, step_match, status, source_indent, background, file_colon_line) + def step_name(keyword, step_match, status, source_indent, _background, _file_colon_line) return if @hide_this_step source_indent = nil unless @options[:source] name_to_report = format_step(keyword, step_match, status, source_indent) @@ -180,11 +180,11 @@ def before_multiline_arg(multiline_arg) @table = multiline_arg end - def after_multiline_arg(multiline_arg) + def after_multiline_arg(_multiline_arg) @table = nil end - def before_table_row(table_row) + def before_table_row(_table_row) return if !@table || @hide_this_step @col_index = 0 @io.print ' |'.indent(@indent-2) @@ -199,7 +199,7 @@ def after_table_row(table_row) end end - def after_table_cell(cell) + def after_table_cell(_cell) return unless @table @col_index += 1 end @@ -215,7 +215,7 @@ def table_cell_value(value, status) @io.flush end - def before_test_case(test_case) + def before_test_case(_test_case) @previous_step_keyword = nil end diff --git a/lib/cucumber/formatter/steps.rb b/lib/cucumber/formatter/steps.rb index 96048f889c..078b93c4db 100644 --- a/lib/cucumber/formatter/steps.rb +++ b/lib/cucumber/formatter/steps.rb @@ -10,7 +10,7 @@ def initialize(runtime, path_or_io, options) @step_definition_files = collect_steps(runtime) end - def after_features(features) + def after_features(_features) print_summary end diff --git a/lib/cucumber/hooks.rb b/lib/cucumber/hooks.rb index 9f1518bb05..d2116ac7ef 100644 --- a/lib/cucumber/hooks.rb +++ b/lib/cucumber/hooks.rb @@ -23,7 +23,7 @@ def after_step_hook(source, location, &block) build_hook_step(source, location, block, AfterStepHook, Core::Test::Action) end - def around_hook(source, &block) + def around_hook(_source, &block) Core::Test::AroundHook.new(&block) end diff --git a/lib/cucumber/multiline_argument.rb b/lib/cucumber/multiline_argument.rb index 6e07f422e4..1427e9cff4 100644 --- a/lib/cucumber/multiline_argument.rb +++ b/lib/cucumber/multiline_argument.rb @@ -49,11 +49,11 @@ def wrap(node) @result end - def doc_string(node, *args) + def doc_string(node, *_args) @result = DocString.new(node) end - def data_table(node, *args) + def data_table(node, *_args) @result = DataTable.new(node) end end diff --git a/lib/cucumber/multiline_argument/data_table.rb b/lib/cucumber/multiline_argument/data_table.rb index 69ae65f1a2..9f26fcc852 100644 --- a/lib/cucumber/multiline_argument/data_table.rb +++ b/lib/cucumber/multiline_argument/data_table.rb @@ -732,7 +732,7 @@ def status :comment end - def ==(o) + def ==(_o) true end diff --git a/lib/cucumber/rake/task.rb b/lib/cucumber/rake/task.rb index 1cf60ea158..d02b3deeb2 100644 --- a/lib/cucumber/rake/task.rb +++ b/lib/cucumber/rake/task.rb @@ -61,7 +61,7 @@ def initialize(libs, cucumber_bin, cucumber_opts, bundler, feature_files) @feature_files = feature_files end - def load_path(libs) + def load_path [format('"%s"', @libs.join(File::PATH_SEPARATOR))] end @@ -84,7 +84,7 @@ def cmd [ Cucumber::RUBY_BINARY, '-S', 'bundle', 'exec', 'cucumber', @cucumber_opts, @feature_files ].flatten else - [ Cucumber::RUBY_BINARY, '-I', load_path(@libs), quoted_binary(@cucumber_bin), + [ Cucumber::RUBY_BINARY, '-I', load_path, quoted_binary(@cucumber_bin), @cucumber_opts, @feature_files ].flatten end end @@ -145,7 +145,7 @@ def define_task #:nodoc: end end - def runner(task_args = nil) #:nodoc: + def runner(_task_args = nil) #:nodoc: cucumber_opts = [(ENV['CUCUMBER_OPTS'] ? ENV['CUCUMBER_OPTS'].split(/\s+/) : nil) || cucumber_opts_with_profile] if(@fork) return ForkedCucumberRunner.new(libs, binary, cucumber_opts, bundler, feature_files) diff --git a/lib/cucumber/rb_support/snippet.rb b/lib/cucumber/rb_support/snippet.rb index ed093128c5..e909ca98d3 100644 --- a/lib/cucumber/rb_support/snippet.rb +++ b/lib/cucumber/rb_support/snippet.rb @@ -122,11 +122,11 @@ def self.new(multiline_argument) end class Builder - def doc_string(*args) + def doc_string(*_args) @result = DocString.new end - def data_table(table, *args) + def data_table(table, *_args) @result = DataTable.new(table) end diff --git a/lib/cucumber/rspec/disable_option_parser.rb b/lib/cucumber/rspec/disable_option_parser.rb index bebbe7437f..6c3cab5e51 100644 --- a/lib/cucumber/rspec/disable_option_parser.rb +++ b/lib/cucumber/rspec/disable_option_parser.rb @@ -8,7 +8,7 @@ module Runner #:nodoc: # will fail when running cucumber) class OptionParser < ::OptionParser #:nodoc: NEUTERED_RSPEC = Object.new - def NEUTERED_RSPEC.method_missing(m, *args); self; end + def NEUTERED_RSPEC.method_missing(_m, *_args); self; end def self.method_added(m) unless @__neutering_rspec diff --git a/lib/cucumber/running_test_case.rb b/lib/cucumber/running_test_case.rb index bf4b252378..1937554f82 100644 --- a/lib/cucumber/running_test_case.rb +++ b/lib/cucumber/running_test_case.rb @@ -32,11 +32,11 @@ def initialize(test_case) def feature(feature) end - def scenario(scenario) + def scenario(_scenario) @factory = Scenario end - def scenario_outline(scenario) + def scenario_outline(_scenario) @factory = ScenarioOutlineExample end diff --git a/lib/cucumber/runtime.rb b/lib/cucumber/runtime.rb index 7dc9ed5aac..ae2d8a2228 100644 --- a/lib/cucumber/runtime.rb +++ b/lib/cucumber/runtime.rb @@ -94,13 +94,13 @@ def begin_scenario(scenario) @support_code.fire_hook(:begin_scenario, scenario) end - def end_scenario(scenario) + def end_scenario(_scenario) @support_code.fire_hook(:end_scenario) end # Returns Ast::DocString for +string_without_triple_quotes+. # - def doc_string(string_without_triple_quotes, content_type='', line_offset=0) + def doc_string(string_without_triple_quotes, content_type='', _line_offset=0) location = Core::Ast::Location.of_caller Core::Ast::DocString.new(string_without_triple_quotes, content_type, location) end diff --git a/lib/cucumber/runtime/for_programming_languages.rb b/lib/cucumber/runtime/for_programming_languages.rb index e0fdc33afc..179db48596 100644 --- a/lib/cucumber/runtime/for_programming_languages.rb +++ b/lib/cucumber/runtime/for_programming_languages.rb @@ -58,7 +58,7 @@ def table(text_or_table, file=nil, line=0) # Returns a Cucumber::MultilineArgument::DocString for +body+. # - def doc_string(body, content_type='', line_offset=0) + def doc_string(body, content_type='', _line_offset=0) location = Core::Ast::Location.of_caller MultilineArgument.doc_string(body, content_type, location) end diff --git a/lib/cucumber/runtime/support_code.rb b/lib/cucumber/runtime/support_code.rb index 0a685ba864..540e540af2 100644 --- a/lib/cucumber/runtime/support_code.rb +++ b/lib/cucumber/runtime/support_code.rb @@ -62,7 +62,7 @@ def configure(new_configuration) # Given I have 8 cukes in my belly # Then I should not be thirsty # }) - def invoke_dynamic_steps(steps_text, i18n, location) + def invoke_dynamic_steps(steps_text, i18n, _location) parser = Cucumber::Gherkin::StepsParser.new(StepInvoker.new(self), i18n.iso_code) parser.parse(steps_text) end @@ -73,7 +73,7 @@ def invoke_dynamic_steps(steps_text, i18n, location) # steps which are compiled into test steps before execution. # # These are commonly called nested steps. - def invoke_dynamic_step(step_name, multiline_argument, location=nil) + def invoke_dynamic_step(step_name, multiline_argument, _location=nil) matches = step_matches(step_name) raise UndefinedDynamicStep, step_name if matches.empty? matches.first.invoke(multiline_argument) diff --git a/lib/cucumber/step_match.rb b/lib/cucumber/step_match.rb index 0cd7c26569..50f8846a85 100644 --- a/lib/cucumber/step_match.rb +++ b/lib/cucumber/step_match.rb @@ -108,7 +108,7 @@ def initialize(step, name) @name = name end - def format_args(*args) + def format_args(*_args) @name end diff --git a/lib/cucumber/step_match_search.rb b/lib/cucumber/step_match_search.rb index 268e990353..028dfb6568 100644 --- a/lib/cucumber/step_match_search.rb +++ b/lib/cucumber/step_match_search.rb @@ -33,7 +33,7 @@ def call(step_name) private - def best_matches(step_name, step_matches) #:nodoc: + def best_matches(_step_name, step_matches) #:nodoc: no_groups = step_matches.select {|step_match| step_match.args.length == 0} max_arg_length = step_matches.map {|step_match| step_match.args.length }.max top_groups = step_matches.select {|step_match| step_match.args.length == max_arg_length } @@ -65,4 +65,3 @@ def call(step_name) #:nodoc: end end - diff --git a/spec/cucumber/formatter/legacy_api/adapter_spec.rb b/spec/cucumber/formatter/legacy_api/adapter_spec.rb index f4d8943a22..46bdae70c9 100644 --- a/spec/cucumber/formatter/legacy_api/adapter_spec.rb +++ b/spec/cucumber/formatter/legacy_api/adapter_spec.rb @@ -59,7 +59,7 @@ def location source_location end - def invoke(pseudo_method, arguments, &block) + def invoke(_pseudo_method, _arguments, &_block) @proc.call end end @@ -1542,7 +1542,7 @@ def after_hooks(source) context 'with exception in after step hook' do class FailingAfterStepHook - def find_after_step_hooks(test_case) + def find_after_step_hooks(_test_case) failing_hook = HookWrapper.new(proc { raise Failure }) Runtime::StepHooks.new [failing_hook] end @@ -2159,11 +2159,11 @@ def legacy_messages ] end - def method_missing(message, *args) + def method_missing(message, *_args) @messages << message end - def respond_to_missing?(name, include_private = false) + def respond_to_missing?(_name, _include_private = false) true end end