Module: Evilution::Reporter::Suggestion::Templates::Generic

Defined in:
lib/evilution/reporter/suggestion/templates/generic.rb

Constant Summary collapse

GENERIC_ENTRIES =
{
  "comparison_replacement" => "Add a test for the boundary condition where the comparison operand equals the threshold exactly",
  "arithmetic_replacement" => "Add a test that verifies the arithmetic result, not just truthiness of the outcome",
  "boolean_operator_replacement" => "Add a test where only one of the boolean conditions is true to distinguish && from ||",
  "boolean_literal_replacement" => "Add a test that exercises the false/true branch explicitly",
  "nil_replacement" => "Add a test that asserts the return value is not nil",
  "integer_literal" => "Add a test that checks the exact numeric value, not just > 0 or truthy",
  "float_literal" => "Add a test that checks the exact floating-point value returned",
  "string_literal" => "Add a test that asserts the string content, not just its presence",
  "array_literal" => "Add a test that verifies the array contents or length",
  "hash_literal" => "Add a test that verifies the hash keys and values",
  "symbol_literal" => "Add a test that checks the exact symbol returned",
  "conditional_negation" => "Add tests for both the true and false branches of this conditional",
  "conditional_branch" => "Add a test that exercises the removed branch of this conditional",
  "statement_deletion" => "Add a test that depends on the side effect of this statement",
  "method_body_replacement" => "Add a test that checks the method's return value or side effects",
  "negation_insertion" => "Add a test where the predicate result matters (not just truthiness)",
  "return_value_removal" => "Add a test that uses the return value of this method",
  "collection_replacement" => "Add a test that checks the return value of the collection operation, not just side effects",
  "method_call_removal" => "Add a test that depends on the return value or side effect of this method call",
  "argument_removal" => "Add a test that verifies the correct arguments are passed to this method call",
  "compound_assignment" => "Add a test that verifies the side effect of this compound assignment (the accumulated value matters)",
  "superclass_removal" => "Add a test that exercises inherited behavior from the superclass",
  "mixin_removal" => "Add a test that exercises behavior provided by the included/extended module",
  "local_variable_assignment" => "Add a test that depends on the assigned variable being stored, not just the value expression",
  "instance_variable_write" => "Add a test that verifies the instance variable is set correctly, not just the return value",
  "class_variable_write" => "Add a test that verifies the class variable is set correctly and affects shared state",
  "global_variable_write" => "Add a test that verifies the global variable is set correctly, not just the value expression",
  "rescue_removal" => "Add a test that triggers the rescued exception and verifies the rescue handler behavior",
  "rescue_body_replacement" => "Add a test that triggers the rescued exception and verifies the rescue body produces the correct result",
  "inline_rescue" => "Add a test that triggers the inline rescue and verifies the fallback value is used correctly",
  "ensure_removal" => "Add a test that verifies the ensure cleanup code runs and its side effects are observable",
  "break_statement" => "Add a test that verifies the break condition and the value returned when the loop exits early",
  "next_statement" => "Add a test that verifies the next condition and the value yielded when the iteration skips",
  "redo_statement" => "Add a test that verifies the redo restarts the iteration and the retry logic is necessary",
  "bang_method" => "Add a test that distinguishes in-place mutation from copy semantics (bang vs non-bang)",
  "bitwise_replacement" => "Add a test that checks the exact bitwise result to distinguish &, |, and ^ operators",
  "bitwise_complement" => "Add a test that verifies the bitwise complement (~) result, not just the sign or magnitude",
  "zsuper_removal" => "Add a test that verifies inherited behavior from super is needed, not just the subclass logic",
  "explicit_super_mutation" => "Add a test that verifies the correct arguments are passed to super and the inherited result matters",
  "index_to_fetch" => "Add a test that distinguishes [] (returns nil for missing keys) from .fetch (raises KeyError)",
  "index_to_dig" => "Add a test that verifies chained [] access returns the correct nested value",
  "index_assignment_removal" => "Add a test that verifies the []= assignment side effect is observable (the collection is modified)",
  "pattern_matching_guard" => "Add a test with input that matches the pattern but fails the guard to verify filtering",
  "pattern_matching_alternative" => "Add a test with input that matches only one specific alternative to verify each branch is reachable",
  "pattern_matching_array" => "Add a test that verifies each element position in the array pattern matches the expected type or value",
  "collection_return" => "Add a test that verifies the method returns a non-empty collection, not just any array or hash",
  "scalar_return" => "Add a test that verifies the method returns a non-zero/non-empty scalar value, not just any type"
}.freeze