diff --git a/Changelog.md b/Changelog.md index e5226176..2a0e72b6 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,7 @@ * Drop support for Ruby < 2.3 * Use frozen string literals globally +* Update to parser ~> 2.5 # v0.8.16 2018-08-03 diff --git a/Gemfile b/Gemfile index d8ae1079..66fa43b0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,7 @@ # frozen_string_literal: true + source 'https://rubygems.org' gemspec name: 'mutant' -eval_gemfile File.expand_path('../Gemfile.shared', __FILE__) +eval_gemfile File.expand_path('Gemfile.shared', __dir__) diff --git a/Gemfile.lock b/Gemfile.lock index 10b53e18..41140c73 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -13,7 +13,7 @@ PATH memoizable (~> 0.4.2) morpher (~> 0.2.6) parallel (~> 1.3) - parser (>= 2.3.1.4, < 2.5) + parser (~> 2.5.1) procto (~> 0.0.2) regexp_parser (~> 0.4.9) unparser (~> 0.2.5) @@ -32,12 +32,12 @@ GEM abstract_type (~> 0.0.7) adamantium (~> 0.2) equalizer (~> 0.0.11) - ast (2.3.0) + ast (2.4.0) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) - codeclimate-engine-rb (0.4.0) + codeclimate-engine-rb (0.4.1) virtus (~> 1.0) coercible (1.0.0) descendants_tracker (~> 0.0.1) @@ -46,41 +46,43 @@ GEM equalizer (~> 0.0.9) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devtools (0.1.18) + devtools (0.1.21) abstract_type (~> 0.0.7) adamantium (~> 0.2.0) anima (~> 0.3.0) concord (~> 0.1.5) - flay (~> 2.8.1) - flog (~> 4.4.0) - mutant (~> 0.8.11) - mutant-rspec (~> 0.8.11) + flay (~> 2.10.0) + flog (~> 4.6.1) + mutant (~> 0.8.16) + mutant-rspec (~> 0.8.16) procto (~> 0.0.3) - rake (~> 12.0.0) - reek (~> 4.6.0) - rspec (~> 3.5.0) - rspec-core (~> 3.5.4) + rake (~> 12.3.0) + reek (~> 5.0.2) + rspec (~> 3.8.0) + rspec-core (~> 3.8.0) rspec-its (~> 1.2.0) - rubocop (~> 0.47.0) - simplecov (~> 0.14.0) - yard (~> 0.9.1) + rubocop (~> 0.59.0) + simplecov (~> 0.16.1) + yard (~> 0.9.16) yardstick (~> 0.9.9) diff-lcs (1.3) - docile (1.1.5) + docile (1.3.1) equalizer (0.0.11) erubis (2.7.0) - ffi (1.9.18) - flay (2.8.1) + ffi (1.9.25) + flay (2.10.0) erubis (~> 2.7.0) path_expander (~> 1.0) ruby_parser (~> 3.0) sexp_processor (~> 4.0) - flog (4.4.1) + flog (4.6.2) path_expander (~> 1.0) ruby_parser (~> 3.1, > 3.1.0) - sexp_processor (~> 4.4) + sexp_processor (~> 4.8) ice_nine (0.11.2) + jaro_winkler (1.5.1) json (2.1.0) + kwalify (0.7.2) memoizable (0.4.2) thread_safe (~> 0.3, >= 0.3.1) morpher (0.2.6) @@ -93,52 +95,54 @@ GEM ice_nine (~> 0.11.0) procto (~> 0.0.2) parallel (1.12.1) - parser (2.4.0.0) - ast (~> 2.2) - path_expander (1.0.2) - powerpack (0.1.1) + parser (2.5.1.2) + ast (~> 2.4.0) + path_expander (1.0.3) + powerpack (0.1.2) procto (0.0.3) - rainbow (2.2.2) - rake - rake (12.0.0) - reek (4.6.2) + rainbow (3.0.0) + rake (12.3.1) + reek (5.0.2) codeclimate-engine-rb (~> 0.4.0) - parser (>= 2.4.0.0, < 2.5) - rainbow (~> 2.0) + kwalify (~> 0.7.0) + parser (>= 2.5.0.0, < 2.6, != 2.5.1.1) + rainbow (>= 2.0, < 4.0) regexp_parser (0.4.13) - rspec (3.5.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-core (3.5.4) - rspec-support (~> 3.5.0) - rspec-expectations (3.5.0) + rspec (3.8.0) + rspec-core (~> 3.8.0) + rspec-expectations (~> 3.8.0) + rspec-mocks (~> 3.8.0) + rspec-core (3.8.0) + rspec-support (~> 3.8.0) + rspec-expectations (3.8.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) + rspec-support (~> 3.8.0) rspec-its (1.2.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) - rspec-mocks (3.5.0) + rspec-mocks (3.8.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-support (3.5.0) - rubocop (0.47.1) - parser (>= 2.3.3.1, < 3.0) + rspec-support (~> 3.8.0) + rspec-support (3.8.0) + rubocop (0.59.0) + jaro_winkler (~> 1.5.1) + parallel (~> 1.10) + parser (>= 2.5, != 2.5.1.1) powerpack (~> 0.1) - rainbow (>= 1.99.1, < 3.0) + rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) - ruby-progressbar (1.8.1) - ruby_parser (3.9.0) - sexp_processor (~> 4.1) - sexp_processor (4.9.0) - simplecov (0.14.1) - docile (~> 1.1.0) + ruby-progressbar (1.10.0) + ruby_parser (3.11.0) + sexp_processor (~> 4.9) + sexp_processor (4.11.0) + simplecov (0.16.1) + docile (~> 1.1) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) - simplecov-html (0.10.1) + simplecov-html (0.10.2) thread_safe (0.3.6) - unicode-display_width (1.3.0) + unicode-display_width (1.4.0) unparser (0.2.8) abstract_type (~> 0.0.7) adamantium (~> 0.2.0) @@ -152,7 +156,7 @@ GEM coercible (~> 1.0) descendants_tracker (~> 0.0, >= 0.0.3) equalizer (~> 0.0, >= 0.0.9) - yard (0.9.9) + yard (0.9.16) yardstick (0.9.9) yard (~> 0.8, >= 0.8.7.2) @@ -161,7 +165,7 @@ PLATFORMS DEPENDENCIES bundler (~> 1.10) - devtools (~> 0.1.12) + devtools (~> 0.1.21) ffi (~> 1.9.6) mutant! diff --git a/Rakefile b/Rakefile index dc3686d2..5ce115af 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'devtools' Devtools.init_rake_tasks diff --git a/config/reek.yml b/config/reek.yml index 429ea105..56ac7664 100644 --- a/config/reek.yml +++ b/config/reek.yml @@ -1,137 +1,137 @@ --- -Attribute: - enabled: false - exclude: [] -BooleanParameter: - enabled: true - exclude: [] -ClassVariable: - enabled: true - exclude: [] -ControlParameter: - enabled: true - exclude: - - Mutant::Expression#match_length -DataClump: - enabled: true - exclude: [] - max_copies: 2 - min_clump_size: 2 -DuplicateMethodCall: - enabled: false - exclude: [] - max_calls: 1 - allow_calls: [] -FeatureEnvy: - enabled: false -# Buggy smell detector -IrresponsibleModule: - enabled: false - exclude: [] -LongParameterList: - enabled: true - exclude: - - Mutant::Matcher::Method::Instance#self.build - - Mutant::Meta::Example::DSL # 3 vars - max_params: 2 -LongYieldList: - enabled: true - exclude: [] - max_params: 2 -NestedIterators: - enabled: true - exclude: - - Mutant#self.singleton_subclass_instance - - Mutant::CLI#parse - - Mutant::Mutator::Node::Arguments#emit_argument_mutations - - Mutant::Mutator::Node::Resbody#mutate_captures - - Mutant::Mutator::Util::Array::Element#dispatch - - Mutant::Parallel::Master#run - - Mutant::RequireHighjack#self.call - - Mutant::Selector::Expression#call - - Parser::Lexer#self.new - max_allowed_nesting: 1 - ignore_iterators: [] -NilCheck: - enabled: false -RepeatedConditional: - enabled: true - exclude: - - Mutant::Mutator - - Mutant::Meta::Example::DSL - max_ifs: 1 -TooManyInstanceVariables: - enabled: true - exclude: - - Mutant::Mutator # 4 vars - - Mutant::Parallel::Master # 4 vars - - Mutant::Meta::Example::DSL # 4 vars - max_instance_variables: 3 -TooManyMethods: - enabled: true - exclude: - - Mutant::CLI - - Mutant::Mutator::Node - - Mutant::Parallel::Master - max_methods: 10 -TooManyStatements: - enabled: true - exclude: - - Mutant::CLI#add_debug_options - - Mutant::CLI#add_environment_options - - Mutant::Reporter::CLI::Printer::Config#run - - Mutant::Reporter::CLI::Printer::EnvProgress#run - - Mutant::Runner#run_driver - - Mutant::Zombifier::File#self.find - max_statements: 7 -UncommunicativeMethodName: - enabled: true - exclude: - - Mutant::AST::Sexp#s - - Mutant::Mutation#sha1 - reject: - - !ruby/regexp /^[a-z]$/ - - !ruby/regexp /[0-9]$/ - - !ruby/regexp /[A-Z]/ - accept: [] -UncommunicativeModuleName: - enabled: true - exclude: [] - reject: - - !ruby/regexp /^.$/ - - !ruby/regexp /[0-9]$/ - accept: [] -UncommunicativeParameterName: - enabled: true - exclude: [] - reject: - - !ruby/regexp /^.$/ - - !ruby/regexp /[0-9]$/ - - !ruby/regexp /[A-Z]/ - accept: [] -UncommunicativeVariableName: - enabled: true - exclude: [] - reject: - - !ruby/regexp /^.$/ - - !ruby/regexp /[0-9]$/ - - !ruby/regexp /[A-Z]/ - accept: ['force_utf32'] -UnusedParameters: - enabled: true - exclude: [] -UtilityFunction: - enabled: true - exclude: - - Mutant::AST::Sexp#s - - Mutant::Actor::Env#new_mailbox - - Mutant::CLI#reporter - - Mutant::Integration::Null#call - - Mutant::Integration::Rspec#parse_example - - Mutant::Integration::Rspec#parse_expression # intentional, private - - Mutant::Meta::Example::Verification#format_mutations # intentional, private - - Mutant::Reporter::CLI::Format::Progressive#new_buffer - - Mutant::Reporter::CLI::Printer::StatusProgressive#object # False positive calls super - - Mutant::Repository::Diff#tracks? # intentional, private - - Mutant::Repository::Diff#within_working_directory? # intentional, private - max_helper_calls: 0 +detectors: + Attribute: + enabled: false + exclude: [] + BooleanParameter: + enabled: true + exclude: [] + ClassVariable: + enabled: true + exclude: [] + ControlParameter: + enabled: true + exclude: + - Mutant::Expression#match_length + DataClump: + enabled: true + exclude: [] + max_copies: 2 + min_clump_size: 2 + DuplicateMethodCall: + enabled: false + exclude: [] + max_calls: 1 + allow_calls: [] + FeatureEnvy: + enabled: false + # Buggy smell detector + IrresponsibleModule: + enabled: false + exclude: [] + LongParameterList: + enabled: true + exclude: + - Mutant::Matcher::Method::Instance#self.build + - Mutant::Meta::Example::DSL # 3 vars + max_params: 2 + LongYieldList: + enabled: true + exclude: [] + max_params: 2 + NestedIterators: + enabled: true + exclude: + - Mutant#self.singleton_subclass_instance + - Mutant::CLI#parse + - Mutant::Mutator::Node::Arguments#emit_argument_mutations + - Mutant::Mutator::Node::Resbody#mutate_captures + - Mutant::Mutator::Util::Array::Element#dispatch + - Mutant::Parallel::Master#run + - Mutant::RequireHighjack#self.call + - Mutant::Selector::Expression#call + - Parser::Lexer#self.new + max_allowed_nesting: 1 + ignore_iterators: [] + NilCheck: + enabled: false + RepeatedConditional: + enabled: true + exclude: + - Mutant::Mutator + - Mutant::Meta::Example::DSL + max_ifs: 1 + TooManyInstanceVariables: + enabled: true + exclude: + - Mutant::Mutator # 4 vars + - Mutant::Parallel::Master # 4 vars + - Mutant::Meta::Example::DSL # 4 vars + max_instance_variables: 3 + TooManyMethods: + enabled: true + exclude: + - Mutant::CLI + - Mutant::Mutator::Node + - Mutant::Parallel::Master + max_methods: 10 + TooManyStatements: + enabled: true + exclude: + - Mutant::CLI#add_debug_options + - Mutant::CLI#add_environment_options + - Mutant::Reporter::CLI::Printer::Config#run + - Mutant::Reporter::CLI::Printer::EnvProgress#run + - Mutant::Runner#run_driver + - Mutant::Zombifier::File#self.find + max_statements: 7 + UncommunicativeMethodName: + enabled: true + exclude: + - Mutant::AST::Sexp#s + - Mutant::Mutation#sha1 + reject: + - '/^[a-z]$/' + - '/[0-9]$/' + - '/[A-Z]/' + accept: [] + UncommunicativeModuleName: + enabled: true + exclude: [] + reject: + - '/^.$/' + - '/[0-9]$/' + accept: [] + UncommunicativeParameterName: + enabled: true + exclude: [] + reject: + - '/^.$/' + - '/[0-9]$/' + - '/[A-Z]/' + accept: [] + UncommunicativeVariableName: + enabled: true + exclude: [] + reject: + - '/^.$/' + - '/[0-9]$/' + - '/[A-Z]/' + accept: ['force_utf32'] + UnusedParameters: + enabled: true + exclude: [] + UtilityFunction: + enabled: true + exclude: + - Mutant::AST::Sexp#s + - Mutant::Actor::Env#new_mailbox + - Mutant::CLI#reporter + - Mutant::Integration::Null#call + - Mutant::Integration::Rspec#parse_example + - Mutant::Integration::Rspec#parse_expression # intentional, private + - Mutant::Meta::Example::Verification#format_mutations # intentional, private + - Mutant::Reporter::CLI::Format::Progressive#new_buffer + - Mutant::Reporter::CLI::Printer::StatusProgressive#object # False positive calls super + - Mutant::Repository::Diff#tracks? # intentional, private + - Mutant::Repository::Diff#within_working_directory? # intentional, private diff --git a/config/rubocop.yml b/config/rubocop.yml index c5eb2dd2..179b6173 100644 --- a/config/rubocop.yml +++ b/config/rubocop.yml @@ -19,7 +19,7 @@ CollectionMethods: find_all: 'select' AccessModifierIndentation: - EnforcedStyle: outdent + Enabled: false # Limit line length LineLength: @@ -181,5 +181,27 @@ AlignHash: Send: Enabled: true +Layout/EmptyLineAfterGuardClause: + Enabled: false +Layout/SpaceInsideArrayLiteralBrackets: + Enabled: false +Lint/BooleanSymbol: + Enabled: false +Lint/InterpolationCheck: + Enabled: false +Lint/MissingCopEnableDirective: + Enabled: false Lint/UnifiedInteger: Enabled: false +Naming/FileName: + Enabled: false +Style/AccessModifierDeclarations: + Enabled: false +Style/CommentedKeyword: + Enabled: false +Style/MixinGrouping: + Enabled: false +Style/RescueStandardError: + Enabled: false +Style/StderrPuts: + Enabled: false diff --git a/lib/mutant.rb b/lib/mutant.rb index 63341890..df4e8f4b 100644 --- a/lib/mutant.rb +++ b/lib/mutant.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'abstract_type' require 'adamantium' require 'anima' diff --git a/lib/mutant/actor.rb b/lib/mutant/actor.rb index cba5fa62..0b4affda 100644 --- a/lib/mutant/actor.rb +++ b/lib/mutant/actor.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # A minimal actor implementation module Actor diff --git a/lib/mutant/actor/env.rb b/lib/mutant/actor/env.rb index 7cee88f4..ff019c63 100644 --- a/lib/mutant/actor/env.rb +++ b/lib/mutant/actor/env.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module Actor # Actor root environment diff --git a/lib/mutant/actor/mailbox.rb b/lib/mutant/actor/mailbox.rb index ae0e637a..366f3a33 100644 --- a/lib/mutant/actor/mailbox.rb +++ b/lib/mutant/actor/mailbox.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module Actor # Unbound mailbox diff --git a/lib/mutant/actor/receiver.rb b/lib/mutant/actor/receiver.rb index 239f532a..40a5fe8b 100644 --- a/lib/mutant/actor/receiver.rb +++ b/lib/mutant/actor/receiver.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module Actor # Receiver side of an actor diff --git a/lib/mutant/actor/sender.rb b/lib/mutant/actor/sender.rb index 3d9c1d34..7700be52 100644 --- a/lib/mutant/actor/sender.rb +++ b/lib/mutant/actor/sender.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module Actor diff --git a/lib/mutant/ast.rb b/lib/mutant/ast.rb index 3f4bcd38..b5b58e53 100644 --- a/lib/mutant/ast.rb +++ b/lib/mutant/ast.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # AST helpers module AST diff --git a/lib/mutant/ast/meta.rb b/lib/mutant/ast/meta.rb index 2bf949b5..1cdb6fe8 100644 --- a/lib/mutant/ast/meta.rb +++ b/lib/mutant/ast/meta.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST # Node meta information mixin diff --git a/lib/mutant/ast/meta/const.rb b/lib/mutant/ast/meta/const.rb index 5878b181..c98f50b4 100644 --- a/lib/mutant/ast/meta/const.rb +++ b/lib/mutant/ast/meta/const.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST # Node meta information mixin diff --git a/lib/mutant/ast/meta/optarg.rb b/lib/mutant/ast/meta/optarg.rb index 85cbf9c8..98b22113 100644 --- a/lib/mutant/ast/meta/optarg.rb +++ b/lib/mutant/ast/meta/optarg.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST # Node meta information mixin diff --git a/lib/mutant/ast/meta/resbody.rb b/lib/mutant/ast/meta/resbody.rb index f297f77c..3a3716a5 100644 --- a/lib/mutant/ast/meta/resbody.rb +++ b/lib/mutant/ast/meta/resbody.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST # Node meta information mixin diff --git a/lib/mutant/ast/meta/restarg.rb b/lib/mutant/ast/meta/restarg.rb index 48757ad9..5732c083 100644 --- a/lib/mutant/ast/meta/restarg.rb +++ b/lib/mutant/ast/meta/restarg.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST # Node meta information mixin diff --git a/lib/mutant/ast/meta/send.rb b/lib/mutant/ast/meta/send.rb index 4c6a0b39..cf947fde 100644 --- a/lib/mutant/ast/meta/send.rb +++ b/lib/mutant/ast/meta/send.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST # Node meta information mixin diff --git a/lib/mutant/ast/meta/symbol.rb b/lib/mutant/ast/meta/symbol.rb index 3668efc9..62e9a064 100644 --- a/lib/mutant/ast/meta/symbol.rb +++ b/lib/mutant/ast/meta/symbol.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST # Node meta information mixin diff --git a/lib/mutant/ast/named_children.rb b/lib/mutant/ast/named_children.rb index 9f7cc7ce..b63a85db 100644 --- a/lib/mutant/ast/named_children.rb +++ b/lib/mutant/ast/named_children.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST diff --git a/lib/mutant/ast/node_predicates.rb b/lib/mutant/ast/node_predicates.rb index 01181b53..70c2e478 100644 --- a/lib/mutant/ast/node_predicates.rb +++ b/lib/mutant/ast/node_predicates.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST # Module for node predicates diff --git a/lib/mutant/ast/nodes.rb b/lib/mutant/ast/nodes.rb index f63bcee1..ac2f6e51 100644 --- a/lib/mutant/ast/nodes.rb +++ b/lib/mutant/ast/nodes.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST # Singleton nodes diff --git a/lib/mutant/ast/regexp.rb b/lib/mutant/ast/regexp.rb index 02186732..98e53469 100644 --- a/lib/mutant/ast/regexp.rb +++ b/lib/mutant/ast/regexp.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST # Regexp source mapper diff --git a/lib/mutant/ast/regexp/transformer.rb b/lib/mutant/ast/regexp/transformer.rb index bd40ec7b..a4ab410b 100644 --- a/lib/mutant/ast/regexp/transformer.rb +++ b/lib/mutant/ast/regexp/transformer.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST module Regexp diff --git a/lib/mutant/ast/regexp/transformer/alternative.rb b/lib/mutant/ast/regexp/transformer/alternative.rb index 2fc029b8..7515d894 100644 --- a/lib/mutant/ast/regexp/transformer/alternative.rb +++ b/lib/mutant/ast/regexp/transformer/alternative.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST module Regexp diff --git a/lib/mutant/ast/regexp/transformer/character_set.rb b/lib/mutant/ast/regexp/transformer/character_set.rb index b83ff399..33f826b2 100644 --- a/lib/mutant/ast/regexp/transformer/character_set.rb +++ b/lib/mutant/ast/regexp/transformer/character_set.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST module Regexp diff --git a/lib/mutant/ast/regexp/transformer/direct.rb b/lib/mutant/ast/regexp/transformer/direct.rb index 1d0e8cea..f8319556 100644 --- a/lib/mutant/ast/regexp/transformer/direct.rb +++ b/lib/mutant/ast/regexp/transformer/direct.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST module Regexp diff --git a/lib/mutant/ast/regexp/transformer/options_group.rb b/lib/mutant/ast/regexp/transformer/options_group.rb index 345ade30..c61efbd9 100644 --- a/lib/mutant/ast/regexp/transformer/options_group.rb +++ b/lib/mutant/ast/regexp/transformer/options_group.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST module Regexp diff --git a/lib/mutant/ast/regexp/transformer/quantifier.rb b/lib/mutant/ast/regexp/transformer/quantifier.rb index b1184396..5a714a29 100644 --- a/lib/mutant/ast/regexp/transformer/quantifier.rb +++ b/lib/mutant/ast/regexp/transformer/quantifier.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST module Regexp diff --git a/lib/mutant/ast/regexp/transformer/recursive.rb b/lib/mutant/ast/regexp/transformer/recursive.rb index bf5a1dad..265bac17 100644 --- a/lib/mutant/ast/regexp/transformer/recursive.rb +++ b/lib/mutant/ast/regexp/transformer/recursive.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST module Regexp diff --git a/lib/mutant/ast/regexp/transformer/root.rb b/lib/mutant/ast/regexp/transformer/root.rb index b1b73533..64cbc85d 100644 --- a/lib/mutant/ast/regexp/transformer/root.rb +++ b/lib/mutant/ast/regexp/transformer/root.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST module Regexp diff --git a/lib/mutant/ast/regexp/transformer/text.rb b/lib/mutant/ast/regexp/transformer/text.rb index bec52e9c..f2a56eeb 100644 --- a/lib/mutant/ast/regexp/transformer/text.rb +++ b/lib/mutant/ast/regexp/transformer/text.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST module Regexp diff --git a/lib/mutant/ast/sexp.rb b/lib/mutant/ast/sexp.rb index f06a9ecc..f31b5c21 100644 --- a/lib/mutant/ast/sexp.rb +++ b/lib/mutant/ast/sexp.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST # Mixin for node sexp syntax diff --git a/lib/mutant/ast/types.rb b/lib/mutant/ast/types.rb index 18f68344..5a531358 100644 --- a/lib/mutant/ast/types.rb +++ b/lib/mutant/ast/types.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module AST # Groups of node types diff --git a/lib/mutant/cli.rb b/lib/mutant/cli.rb index b5fd7994..45b5ce52 100644 --- a/lib/mutant/cli.rb +++ b/lib/mutant/cli.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Commandline parser / runner class CLI diff --git a/lib/mutant/color.rb b/lib/mutant/color.rb index 75680b43..25e76a5c 100644 --- a/lib/mutant/color.rb +++ b/lib/mutant/color.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Class to colorize strings class Color @@ -25,7 +26,7 @@ module Mutant text end - private # rubocop:disable AccessModifierIndentation + private # Initialize null color # diff --git a/lib/mutant/config.rb b/lib/mutant/config.rb index d2ea5cb5..d06ce3e8 100644 --- a/lib/mutant/config.rb +++ b/lib/mutant/config.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Standalone configuration of a mutant execution. # diff --git a/lib/mutant/context.rb b/lib/mutant/context.rb index c725a83f..da8ac5bc 100644 --- a/lib/mutant/context.rb +++ b/lib/mutant/context.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # An abstract context where mutations can be applied to. class Context diff --git a/lib/mutant/diff.rb b/lib/mutant/diff.rb index 16e0fda2..81fef0ee 100644 --- a/lib/mutant/diff.rb +++ b/lib/mutant/diff.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Class to create diffs from source code class Diff diff --git a/lib/mutant/env.rb b/lib/mutant/env.rb index 7b62ef7b..4d9e3164 100644 --- a/lib/mutant/env.rb +++ b/lib/mutant/env.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Abstract base class for mutant environments class Env diff --git a/lib/mutant/env/bootstrap.rb b/lib/mutant/env/bootstrap.rb index 03b62114..e6e37da4 100644 --- a/lib/mutant/env/bootstrap.rb +++ b/lib/mutant/env/bootstrap.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Env # Bootstrap environment diff --git a/lib/mutant/expression.rb b/lib/mutant/expression.rb index 33ecd64a..e77c2571 100644 --- a/lib/mutant/expression.rb +++ b/lib/mutant/expression.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Abstract base class for match expression diff --git a/lib/mutant/expression/method.rb b/lib/mutant/expression/method.rb index ae743206..bcc46a74 100644 --- a/lib/mutant/expression/method.rb +++ b/lib/mutant/expression/method.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Expression diff --git a/lib/mutant/expression/methods.rb b/lib/mutant/expression/methods.rb index e0395e9b..05489fd6 100644 --- a/lib/mutant/expression/methods.rb +++ b/lib/mutant/expression/methods.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Expression diff --git a/lib/mutant/expression/namespace.rb b/lib/mutant/expression/namespace.rb index 11e9d991..b573bb72 100644 --- a/lib/mutant/expression/namespace.rb +++ b/lib/mutant/expression/namespace.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Expression # Abstract base class for expressions matching namespaces diff --git a/lib/mutant/expression/parser.rb b/lib/mutant/expression/parser.rb index 0b39b468..63894165 100644 --- a/lib/mutant/expression/parser.rb +++ b/lib/mutant/expression/parser.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Expression class Parser diff --git a/lib/mutant/integration.rb b/lib/mutant/integration.rb index 7acffe31..b6847821 100644 --- a/lib/mutant/integration.rb +++ b/lib/mutant/integration.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Abstract base class mutant test framework integrations diff --git a/lib/mutant/integration/rspec.rb b/lib/mutant/integration/rspec.rb index e313b0c1..1e9b2056 100644 --- a/lib/mutant/integration/rspec.rb +++ b/lib/mutant/integration/rspec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'rspec/core' module Mutant diff --git a/lib/mutant/isolation.rb b/lib/mutant/isolation.rb index fbc68421..ad6f5a0e 100644 --- a/lib/mutant/isolation.rb +++ b/lib/mutant/isolation.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Isolation include AbstractType diff --git a/lib/mutant/isolation/fork.rb b/lib/mutant/isolation/fork.rb index 6a5a18be..ef6a76ad 100644 --- a/lib/mutant/isolation/fork.rb +++ b/lib/mutant/isolation/fork.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Isolation # Isolation via the fork(2) systemcall. diff --git a/lib/mutant/isolation/none.rb b/lib/mutant/isolation/none.rb index d91afbaa..d4b16504 100644 --- a/lib/mutant/isolation/none.rb +++ b/lib/mutant/isolation/none.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Module providing isolation class Isolation diff --git a/lib/mutant/loader.rb b/lib/mutant/loader.rb index a159f885..56c442c3 100644 --- a/lib/mutant/loader.rb +++ b/lib/mutant/loader.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Base class for code loaders class Loader diff --git a/lib/mutant/matcher.rb b/lib/mutant/matcher.rb index 46303686..c2a40a65 100644 --- a/lib/mutant/matcher.rb +++ b/lib/mutant/matcher.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Abstract matcher to find subjects to mutate class Matcher diff --git a/lib/mutant/matcher/chain.rb b/lib/mutant/matcher/chain.rb index 62473ac9..1792092a 100644 --- a/lib/mutant/matcher/chain.rb +++ b/lib/mutant/matcher/chain.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Matcher # Matcher chaining results of other matchers together diff --git a/lib/mutant/matcher/compiler.rb b/lib/mutant/matcher/compiler.rb index 0f39075d..c21e1c72 100644 --- a/lib/mutant/matcher/compiler.rb +++ b/lib/mutant/matcher/compiler.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Matcher diff --git a/lib/mutant/matcher/config.rb b/lib/mutant/matcher/config.rb index df6ae34a..fbdff936 100644 --- a/lib/mutant/matcher/config.rb +++ b/lib/mutant/matcher/config.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Matcher # Subject matcher configuration diff --git a/lib/mutant/matcher/filter.rb b/lib/mutant/matcher/filter.rb index 02bf5c8a..3e037b2c 100644 --- a/lib/mutant/matcher/filter.rb +++ b/lib/mutant/matcher/filter.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Matcher # Matcher filter diff --git a/lib/mutant/matcher/method.rb b/lib/mutant/matcher/method.rb index 3bdeb43b..2b091205 100644 --- a/lib/mutant/matcher/method.rb +++ b/lib/mutant/matcher/method.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Matcher # Abstract base class for method matchers diff --git a/lib/mutant/matcher/method/instance.rb b/lib/mutant/matcher/method/instance.rb index a96a8bf5..d13754f9 100644 --- a/lib/mutant/matcher/method/instance.rb +++ b/lib/mutant/matcher/method/instance.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Matcher class Method diff --git a/lib/mutant/matcher/method/singleton.rb b/lib/mutant/matcher/method/singleton.rb index 579fcd02..446b1e74 100644 --- a/lib/mutant/matcher/method/singleton.rb +++ b/lib/mutant/matcher/method/singleton.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Matcher class Method diff --git a/lib/mutant/matcher/methods.rb b/lib/mutant/matcher/methods.rb index f23e6fd5..16a2b35a 100644 --- a/lib/mutant/matcher/methods.rb +++ b/lib/mutant/matcher/methods.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Matcher # Abstract base class for matcher that returns method subjects from scope diff --git a/lib/mutant/matcher/namespace.rb b/lib/mutant/matcher/namespace.rb index 7c8a69ab..e4631a02 100644 --- a/lib/mutant/matcher/namespace.rb +++ b/lib/mutant/matcher/namespace.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Matcher # Matcher for specific namespace diff --git a/lib/mutant/matcher/null.rb b/lib/mutant/matcher/null.rb index 133906c0..1e4e2c40 100644 --- a/lib/mutant/matcher/null.rb +++ b/lib/mutant/matcher/null.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Matcher # A null matcher, that does not match any subjects diff --git a/lib/mutant/matcher/scope.rb b/lib/mutant/matcher/scope.rb index b56edc9b..db9adfdd 100644 --- a/lib/mutant/matcher/scope.rb +++ b/lib/mutant/matcher/scope.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Matcher # Matcher expanding Mutant::Scope objects into method matches diff --git a/lib/mutant/matcher/static.rb b/lib/mutant/matcher/static.rb index fbced4ef..029f020d 100644 --- a/lib/mutant/matcher/static.rb +++ b/lib/mutant/matcher/static.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Matcher # Matcher returning subjects already known at its creation time diff --git a/lib/mutant/meta.rb b/lib/mutant/meta.rb index 8d29bd33..aaff26f8 100644 --- a/lib/mutant/meta.rb +++ b/lib/mutant/meta.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Namespace for mutant metadata module Meta @@ -15,6 +16,8 @@ module Mutant # Add example # # @return [undefined] + # + # rubocop:disable Performance/Caller def self.add(type, &block) file = caller.first.split(':in', 2).first ALL << DSL.call(file, type, block) diff --git a/lib/mutant/meta/example.rb b/lib/mutant/meta/example.rb index 7b2ac6a9..5787aa97 100644 --- a/lib/mutant/meta/example.rb +++ b/lib/mutant/meta/example.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module Meta class Example diff --git a/lib/mutant/meta/example/dsl.rb b/lib/mutant/meta/example/dsl.rb index 7b408298..3455d070 100644 --- a/lib/mutant/meta/example/dsl.rb +++ b/lib/mutant/meta/example/dsl.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module Meta class Example diff --git a/lib/mutant/meta/example/verification.rb b/lib/mutant/meta/example/verification.rb index 79fedd98..c3bf4637 100644 --- a/lib/mutant/meta/example/verification.rb +++ b/lib/mutant/meta/example/verification.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module Meta class Example diff --git a/lib/mutant/mutation.rb b/lib/mutant/mutation.rb index 573e0daf..d3674c4f 100644 --- a/lib/mutant/mutation.rb +++ b/lib/mutant/mutation.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Represent a mutated node with its subject class Mutation diff --git a/lib/mutant/mutator.rb b/lib/mutant/mutator.rb index 43a115d9..645f5718 100644 --- a/lib/mutant/mutator.rb +++ b/lib/mutant/mutator.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Generator for mutations class Mutator diff --git a/lib/mutant/mutator/node.rb b/lib/mutant/mutator/node.rb index e3602289..de0c40e3 100644 --- a/lib/mutant/mutator/node.rb +++ b/lib/mutant/mutator/node.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Generator for mutations diff --git a/lib/mutant/mutator/node/and_asgn.rb b/lib/mutant/mutator/node/and_asgn.rb index 1cfdccde..dffd247e 100644 --- a/lib/mutant/mutator/node/and_asgn.rb +++ b/lib/mutant/mutator/node/and_asgn.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/argument.rb b/lib/mutant/mutator/node/argument.rb index 48089788..50305636 100644 --- a/lib/mutant/mutator/node/argument.rb +++ b/lib/mutant/mutator/node/argument.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/arguments.rb b/lib/mutant/mutator/node/arguments.rb index 93fa9015..f2ca9bb6 100644 --- a/lib/mutant/mutator/node/arguments.rb +++ b/lib/mutant/mutator/node/arguments.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/begin.rb b/lib/mutant/mutator/node/begin.rb index 2f2184b9..666465e4 100644 --- a/lib/mutant/mutator/node/begin.rb +++ b/lib/mutant/mutator/node/begin.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/binary.rb b/lib/mutant/mutator/node/binary.rb index 9e5cbc11..ea7c57ce 100644 --- a/lib/mutant/mutator/node/binary.rb +++ b/lib/mutant/mutator/node/binary.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/block.rb b/lib/mutant/mutator/node/block.rb index cd681a96..9b54d392 100644 --- a/lib/mutant/mutator/node/block.rb +++ b/lib/mutant/mutator/node/block.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/break.rb b/lib/mutant/mutator/node/break.rb index d52da168..f942f76a 100644 --- a/lib/mutant/mutator/node/break.rb +++ b/lib/mutant/mutator/node/break.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/case.rb b/lib/mutant/mutator/node/case.rb index eff072bb..131bcff9 100644 --- a/lib/mutant/mutator/node/case.rb +++ b/lib/mutant/mutator/node/case.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/class.rb b/lib/mutant/mutator/node/class.rb index b5e16fc9..83d9e619 100644 --- a/lib/mutant/mutator/node/class.rb +++ b/lib/mutant/mutator/node/class.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/conditional_loop.rb b/lib/mutant/mutator/node/conditional_loop.rb index 91b6589c..68503ea1 100644 --- a/lib/mutant/mutator/node/conditional_loop.rb +++ b/lib/mutant/mutator/node/conditional_loop.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/const.rb b/lib/mutant/mutator/node/const.rb index 4470a912..598f494a 100644 --- a/lib/mutant/mutator/node/const.rb +++ b/lib/mutant/mutator/node/const.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/define.rb b/lib/mutant/mutator/node/define.rb index b475903f..3b3bc7c6 100644 --- a/lib/mutant/mutator/node/define.rb +++ b/lib/mutant/mutator/node/define.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/defined.rb b/lib/mutant/mutator/node/defined.rb index 48628e42..bd8c162f 100644 --- a/lib/mutant/mutator/node/defined.rb +++ b/lib/mutant/mutator/node/defined.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/dstr.rb b/lib/mutant/mutator/node/dstr.rb index 5f318bb2..0bf262e5 100644 --- a/lib/mutant/mutator/node/dstr.rb +++ b/lib/mutant/mutator/node/dstr.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/dsym.rb b/lib/mutant/mutator/node/dsym.rb index 12646d37..15d3f7b6 100644 --- a/lib/mutant/mutator/node/dsym.rb +++ b/lib/mutant/mutator/node/dsym.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/generic.rb b/lib/mutant/mutator/node/generic.rb index ec8c3b05..e0a50ae1 100644 --- a/lib/mutant/mutator/node/generic.rb +++ b/lib/mutant/mutator/node/generic.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/if.rb b/lib/mutant/mutator/node/if.rb index 85b7a5f5..845b8148 100644 --- a/lib/mutant/mutator/node/if.rb +++ b/lib/mutant/mutator/node/if.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/kwbegin.rb b/lib/mutant/mutator/node/kwbegin.rb index e5134a3e..1576b837 100644 --- a/lib/mutant/mutator/node/kwbegin.rb +++ b/lib/mutant/mutator/node/kwbegin.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/literal.rb b/lib/mutant/mutator/node/literal.rb index 084c735f..63eb0aa5 100644 --- a/lib/mutant/mutator/node/literal.rb +++ b/lib/mutant/mutator/node/literal.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/literal/array.rb b/lib/mutant/mutator/node/literal/array.rb index ed81ca59..b18f71e4 100644 --- a/lib/mutant/mutator/node/literal/array.rb +++ b/lib/mutant/mutator/node/literal/array.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/literal/boolean.rb b/lib/mutant/mutator/node/literal/boolean.rb index 9f70cf74..8e9bdb7c 100644 --- a/lib/mutant/mutator/node/literal/boolean.rb +++ b/lib/mutant/mutator/node/literal/boolean.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/literal/float.rb b/lib/mutant/mutator/node/literal/float.rb index ac3104e9..7786a4d4 100644 --- a/lib/mutant/mutator/node/literal/float.rb +++ b/lib/mutant/mutator/node/literal/float.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/literal/hash.rb b/lib/mutant/mutator/node/literal/hash.rb index f1ba62e8..95576adb 100644 --- a/lib/mutant/mutator/node/literal/hash.rb +++ b/lib/mutant/mutator/node/literal/hash.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/literal/integer.rb b/lib/mutant/mutator/node/literal/integer.rb index 0f76da84..5a4ffbf9 100644 --- a/lib/mutant/mutator/node/literal/integer.rb +++ b/lib/mutant/mutator/node/literal/integer.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/literal/nil.rb b/lib/mutant/mutator/node/literal/nil.rb index f6f796a0..d238573b 100644 --- a/lib/mutant/mutator/node/literal/nil.rb +++ b/lib/mutant/mutator/node/literal/nil.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/literal/range.rb b/lib/mutant/mutator/node/literal/range.rb index 53db12d4..8665b50b 100644 --- a/lib/mutant/mutator/node/literal/range.rb +++ b/lib/mutant/mutator/node/literal/range.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/literal/regex.rb b/lib/mutant/mutator/node/literal/regex.rb index b5892e57..90e3ad6d 100644 --- a/lib/mutant/mutator/node/literal/regex.rb +++ b/lib/mutant/mutator/node/literal/regex.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/literal/string.rb b/lib/mutant/mutator/node/literal/string.rb index ed3bc87e..473f20e3 100644 --- a/lib/mutant/mutator/node/literal/string.rb +++ b/lib/mutant/mutator/node/literal/string.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/literal/symbol.rb b/lib/mutant/mutator/node/literal/symbol.rb index 4b05fc74..0001685c 100644 --- a/lib/mutant/mutator/node/literal/symbol.rb +++ b/lib/mutant/mutator/node/literal/symbol.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/masgn.rb b/lib/mutant/mutator/node/masgn.rb index c5ffb4bb..8ac5c3d1 100644 --- a/lib/mutant/mutator/node/masgn.rb +++ b/lib/mutant/mutator/node/masgn.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/match_current_line.rb b/lib/mutant/mutator/node/match_current_line.rb index 6849a4d2..759b3804 100644 --- a/lib/mutant/mutator/node/match_current_line.rb +++ b/lib/mutant/mutator/node/match_current_line.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/mlhs.rb b/lib/mutant/mutator/node/mlhs.rb index 601e55a2..02632ec1 100644 --- a/lib/mutant/mutator/node/mlhs.rb +++ b/lib/mutant/mutator/node/mlhs.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/named_value/access.rb b/lib/mutant/mutator/node/named_value/access.rb index 95090030..67ef182e 100644 --- a/lib/mutant/mutator/node/named_value/access.rb +++ b/lib/mutant/mutator/node/named_value/access.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/named_value/constant_assignment.rb b/lib/mutant/mutator/node/named_value/constant_assignment.rb index fc4cc0d9..35745e74 100644 --- a/lib/mutant/mutator/node/named_value/constant_assignment.rb +++ b/lib/mutant/mutator/node/named_value/constant_assignment.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/named_value/variable_assignment.rb b/lib/mutant/mutator/node/named_value/variable_assignment.rb index bdcbd6db..3d10bf6c 100644 --- a/lib/mutant/mutator/node/named_value/variable_assignment.rb +++ b/lib/mutant/mutator/node/named_value/variable_assignment.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/next.rb b/lib/mutant/mutator/node/next.rb index 8463d711..a58c917c 100644 --- a/lib/mutant/mutator/node/next.rb +++ b/lib/mutant/mutator/node/next.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/noop.rb b/lib/mutant/mutator/node/noop.rb index 8ba82cdb..6ee98b72 100644 --- a/lib/mutant/mutator/node/noop.rb +++ b/lib/mutant/mutator/node/noop.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node @@ -6,7 +7,7 @@ module Mutant # Mutation emitter to handle noop nodes class Noop < self - handle(:block_pass, :cbase) + handle(:__ENCODING__, :block_pass, :cbase) private diff --git a/lib/mutant/mutator/node/nthref.rb b/lib/mutant/mutator/node/nthref.rb index d09e6426..e1aa3c30 100644 --- a/lib/mutant/mutator/node/nthref.rb +++ b/lib/mutant/mutator/node/nthref.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/op_asgn.rb b/lib/mutant/mutator/node/op_asgn.rb index ab1e78bf..b4105693 100644 --- a/lib/mutant/mutator/node/op_asgn.rb +++ b/lib/mutant/mutator/node/op_asgn.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/or_asgn.rb b/lib/mutant/mutator/node/or_asgn.rb index 5ef04f34..1d0aae7d 100644 --- a/lib/mutant/mutator/node/or_asgn.rb +++ b/lib/mutant/mutator/node/or_asgn.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/regexp.rb b/lib/mutant/mutator/node/regexp.rb index 0fbaa4c0..4230d9d8 100644 --- a/lib/mutant/mutator/node/regexp.rb +++ b/lib/mutant/mutator/node/regexp.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/regexp/alternation_meta.rb b/lib/mutant/mutator/node/regexp/alternation_meta.rb index 038c27df..e369dbbd 100644 --- a/lib/mutant/mutator/node/regexp/alternation_meta.rb +++ b/lib/mutant/mutator/node/regexp/alternation_meta.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/regexp/capture_group.rb b/lib/mutant/mutator/node/regexp/capture_group.rb index a1d6d569..88f46ea1 100644 --- a/lib/mutant/mutator/node/regexp/capture_group.rb +++ b/lib/mutant/mutator/node/regexp/capture_group.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/regexp/character_type.rb b/lib/mutant/mutator/node/regexp/character_type.rb index b9ca5ebf..6ea7ea0c 100644 --- a/lib/mutant/mutator/node/regexp/character_type.rb +++ b/lib/mutant/mutator/node/regexp/character_type.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/regexp/end_of_line_anchor.rb b/lib/mutant/mutator/node/regexp/end_of_line_anchor.rb index e26fdd1b..057ace48 100644 --- a/lib/mutant/mutator/node/regexp/end_of_line_anchor.rb +++ b/lib/mutant/mutator/node/regexp/end_of_line_anchor.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/regexp/end_of_string_or_before_end_of_line_anchor.rb b/lib/mutant/mutator/node/regexp/end_of_string_or_before_end_of_line_anchor.rb index bb9139fa..e372751d 100644 --- a/lib/mutant/mutator/node/regexp/end_of_string_or_before_end_of_line_anchor.rb +++ b/lib/mutant/mutator/node/regexp/end_of_string_or_before_end_of_line_anchor.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/regexp/greedy_zero_or_more.rb b/lib/mutant/mutator/node/regexp/greedy_zero_or_more.rb index 368ba921..90b2f8cb 100644 --- a/lib/mutant/mutator/node/regexp/greedy_zero_or_more.rb +++ b/lib/mutant/mutator/node/regexp/greedy_zero_or_more.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/regopt.rb b/lib/mutant/mutator/node/regopt.rb index 8a7343ec..f43e3a23 100644 --- a/lib/mutant/mutator/node/regopt.rb +++ b/lib/mutant/mutator/node/regopt.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/resbody.rb b/lib/mutant/mutator/node/resbody.rb index 0b2cbd9c..b7b5d148 100644 --- a/lib/mutant/mutator/node/resbody.rb +++ b/lib/mutant/mutator/node/resbody.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/rescue.rb b/lib/mutant/mutator/node/rescue.rb index 49cebfec..79390606 100644 --- a/lib/mutant/mutator/node/rescue.rb +++ b/lib/mutant/mutator/node/rescue.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/return.rb b/lib/mutant/mutator/node/return.rb index 052e98d2..d42dc8b2 100644 --- a/lib/mutant/mutator/node/return.rb +++ b/lib/mutant/mutator/node/return.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/send.rb b/lib/mutant/mutator/node/send.rb index a34721af..dc041aa9 100644 --- a/lib/mutant/mutator/node/send.rb +++ b/lib/mutant/mutator/node/send.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/send/attribute_assignment.rb b/lib/mutant/mutator/node/send/attribute_assignment.rb index 77798a2b..124915d2 100644 --- a/lib/mutant/mutator/node/send/attribute_assignment.rb +++ b/lib/mutant/mutator/node/send/attribute_assignment.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/send/binary.rb b/lib/mutant/mutator/node/send/binary.rb index f306f21f..5fefc792 100644 --- a/lib/mutant/mutator/node/send/binary.rb +++ b/lib/mutant/mutator/node/send/binary.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/send/conditional.rb b/lib/mutant/mutator/node/send/conditional.rb index bb2992a0..3631411e 100644 --- a/lib/mutant/mutator/node/send/conditional.rb +++ b/lib/mutant/mutator/node/send/conditional.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/send/index.rb b/lib/mutant/mutator/node/send/index.rb index 38462f7e..091c7b2a 100644 --- a/lib/mutant/mutator/node/send/index.rb +++ b/lib/mutant/mutator/node/send/index.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/splat.rb b/lib/mutant/mutator/node/splat.rb index 0a7c8889..a67bcda4 100644 --- a/lib/mutant/mutator/node/splat.rb +++ b/lib/mutant/mutator/node/splat.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/super.rb b/lib/mutant/mutator/node/super.rb index 19238035..89d7fe8c 100644 --- a/lib/mutant/mutator/node/super.rb +++ b/lib/mutant/mutator/node/super.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/when.rb b/lib/mutant/mutator/node/when.rb index 459888da..d2571184 100644 --- a/lib/mutant/mutator/node/when.rb +++ b/lib/mutant/mutator/node/when.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/yield.rb b/lib/mutant/mutator/node/yield.rb index 7bdc2f54..cbe3f6e7 100644 --- a/lib/mutant/mutator/node/yield.rb +++ b/lib/mutant/mutator/node/yield.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/node/zsuper.rb b/lib/mutant/mutator/node/zsuper.rb index 978a1cf8..c0ab43c0 100644 --- a/lib/mutant/mutator/node/zsuper.rb +++ b/lib/mutant/mutator/node/zsuper.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Node diff --git a/lib/mutant/mutator/util.rb b/lib/mutant/mutator/util.rb index add7a4c4..0acfabc3 100644 --- a/lib/mutant/mutator/util.rb +++ b/lib/mutant/mutator/util.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator # Namespace for utility mutators diff --git a/lib/mutant/mutator/util/array.rb b/lib/mutant/mutator/util/array.rb index a5fd1491..c5710b82 100644 --- a/lib/mutant/mutator/util/array.rb +++ b/lib/mutant/mutator/util/array.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Util diff --git a/lib/mutant/mutator/util/symbol.rb b/lib/mutant/mutator/util/symbol.rb index fdcea9e7..91b5fd88 100644 --- a/lib/mutant/mutator/util/symbol.rb +++ b/lib/mutant/mutator/util/symbol.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Mutator class Util diff --git a/lib/mutant/parallel.rb b/lib/mutant/parallel.rb index 50423890..2b4cfd3b 100644 --- a/lib/mutant/parallel.rb +++ b/lib/mutant/parallel.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Parallel execution engine of arbitrary payloads module Parallel diff --git a/lib/mutant/parallel/master.rb b/lib/mutant/parallel/master.rb index f09eb639..a77ca862 100644 --- a/lib/mutant/parallel/master.rb +++ b/lib/mutant/parallel/master.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module Parallel # Master parallel worker diff --git a/lib/mutant/parallel/source.rb b/lib/mutant/parallel/source.rb index edc22470..82290412 100644 --- a/lib/mutant/parallel/source.rb +++ b/lib/mutant/parallel/source.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module Parallel # Job source for parallel execution diff --git a/lib/mutant/parallel/worker.rb b/lib/mutant/parallel/worker.rb index e1a3f2a4..cbb2df71 100644 --- a/lib/mutant/parallel/worker.rb +++ b/lib/mutant/parallel/worker.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module Parallel # Parallel execution worker diff --git a/lib/mutant/parser.rb b/lib/mutant/parser.rb index 22377576..349022b0 100644 --- a/lib/mutant/parser.rb +++ b/lib/mutant/parser.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # An AST Parser class Parser diff --git a/lib/mutant/registry.rb b/lib/mutant/registry.rb index 3bf82143..f44e6e97 100644 --- a/lib/mutant/registry.rb +++ b/lib/mutant/registry.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Registry for mapping AST types to classes class Registry diff --git a/lib/mutant/reporter.rb b/lib/mutant/reporter.rb index 2b0f250c..0641200c 100644 --- a/lib/mutant/reporter.rb +++ b/lib/mutant/reporter.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Abstract base class for reporters class Reporter diff --git a/lib/mutant/reporter/cli.rb b/lib/mutant/reporter/cli.rb index 6a57b395..4912984e 100644 --- a/lib/mutant/reporter/cli.rb +++ b/lib/mutant/reporter/cli.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Reporter # Reporter that reports in human readable format diff --git a/lib/mutant/reporter/cli/format.rb b/lib/mutant/reporter/cli/format.rb index 3524a5c4..3ab9563d 100644 --- a/lib/mutant/reporter/cli/format.rb +++ b/lib/mutant/reporter/cli/format.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Reporter class CLI diff --git a/lib/mutant/reporter/cli/printer.rb b/lib/mutant/reporter/cli/printer.rb index 783f6ca4..9ef2c40d 100644 --- a/lib/mutant/reporter/cli/printer.rb +++ b/lib/mutant/reporter/cli/printer.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Reporter class CLI diff --git a/lib/mutant/reporter/cli/printer/config.rb b/lib/mutant/reporter/cli/printer/config.rb index 09ed2729..71ee2219 100644 --- a/lib/mutant/reporter/cli/printer/config.rb +++ b/lib/mutant/reporter/cli/printer/config.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Reporter class CLI diff --git a/lib/mutant/reporter/cli/printer/env_progress.rb b/lib/mutant/reporter/cli/printer/env_progress.rb index 014ead40..184ed512 100644 --- a/lib/mutant/reporter/cli/printer/env_progress.rb +++ b/lib/mutant/reporter/cli/printer/env_progress.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Reporter class CLI @@ -18,7 +19,6 @@ module Mutant :env ) - # rubocop:disable SpaceInsideBrackets FORMATS = IceNine.deep_freeze([ [:info, 'Subjects: %s', :amount_subjects ], [:info, 'Mutations: %s', :amount_mutations ], diff --git a/lib/mutant/reporter/cli/printer/env_result.rb b/lib/mutant/reporter/cli/printer/env_result.rb index 20ca5f08..b9ef695b 100644 --- a/lib/mutant/reporter/cli/printer/env_result.rb +++ b/lib/mutant/reporter/cli/printer/env_result.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Reporter class CLI diff --git a/lib/mutant/reporter/cli/printer/mutation_progress_result.rb b/lib/mutant/reporter/cli/printer/mutation_progress_result.rb index baea78d1..78f7f325 100644 --- a/lib/mutant/reporter/cli/printer/mutation_progress_result.rb +++ b/lib/mutant/reporter/cli/printer/mutation_progress_result.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Reporter class CLI diff --git a/lib/mutant/reporter/cli/printer/mutation_result.rb b/lib/mutant/reporter/cli/printer/mutation_result.rb index ed7d149c..a52e0915 100644 --- a/lib/mutant/reporter/cli/printer/mutation_result.rb +++ b/lib/mutant/reporter/cli/printer/mutation_result.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Reporter class CLI diff --git a/lib/mutant/reporter/cli/printer/status.rb b/lib/mutant/reporter/cli/printer/status.rb index 32044ef9..2e956195 100644 --- a/lib/mutant/reporter/cli/printer/status.rb +++ b/lib/mutant/reporter/cli/printer/status.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Reporter class CLI diff --git a/lib/mutant/reporter/cli/printer/status_progressive.rb b/lib/mutant/reporter/cli/printer/status_progressive.rb index ecca5fb9..06bea3bf 100644 --- a/lib/mutant/reporter/cli/printer/status_progressive.rb +++ b/lib/mutant/reporter/cli/printer/status_progressive.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Reporter class CLI diff --git a/lib/mutant/reporter/cli/printer/subject_progress.rb b/lib/mutant/reporter/cli/printer/subject_progress.rb index b42f67a8..25935f1e 100644 --- a/lib/mutant/reporter/cli/printer/subject_progress.rb +++ b/lib/mutant/reporter/cli/printer/subject_progress.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Reporter class CLI diff --git a/lib/mutant/reporter/cli/printer/subject_result.rb b/lib/mutant/reporter/cli/printer/subject_result.rb index 52d27b69..70079a49 100644 --- a/lib/mutant/reporter/cli/printer/subject_result.rb +++ b/lib/mutant/reporter/cli/printer/subject_result.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Reporter class CLI diff --git a/lib/mutant/reporter/cli/printer/test_result.rb b/lib/mutant/reporter/cli/printer/test_result.rb index 29937390..12e178d0 100644 --- a/lib/mutant/reporter/cli/printer/test_result.rb +++ b/lib/mutant/reporter/cli/printer/test_result.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Reporter class CLI diff --git a/lib/mutant/reporter/cli/tput.rb b/lib/mutant/reporter/cli/tput.rb index 550d2bf9..6ccce313 100644 --- a/lib/mutant/reporter/cli/tput.rb +++ b/lib/mutant/reporter/cli/tput.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Reporter class CLI diff --git a/lib/mutant/reporter/null.rb b/lib/mutant/reporter/null.rb index b1702de4..492a00b9 100644 --- a/lib/mutant/reporter/null.rb +++ b/lib/mutant/reporter/null.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Reporter diff --git a/lib/mutant/reporter/sequence.rb b/lib/mutant/reporter/sequence.rb index 6703eaa0..93385bea 100644 --- a/lib/mutant/reporter/sequence.rb +++ b/lib/mutant/reporter/sequence.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Reporter class Sequence < self diff --git a/lib/mutant/repository.rb b/lib/mutant/repository.rb index cb6797d2..963516a9 100644 --- a/lib/mutant/repository.rb +++ b/lib/mutant/repository.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant module Repository # Error raised on repository interaction problems diff --git a/lib/mutant/require_highjack.rb b/lib/mutant/require_highjack.rb index 3e58c0d0..40e64f58 100644 --- a/lib/mutant/require_highjack.rb +++ b/lib/mutant/require_highjack.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Require highjack module RequireHighjack diff --git a/lib/mutant/result.rb b/lib/mutant/result.rb index 2c54c78a..8fb15c4e 100644 --- a/lib/mutant/result.rb +++ b/lib/mutant/result.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Namespace and mixin module for results module Result diff --git a/lib/mutant/runner.rb b/lib/mutant/runner.rb index e28c990a..1f7391ca 100644 --- a/lib/mutant/runner.rb +++ b/lib/mutant/runner.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Runner baseclass class Runner diff --git a/lib/mutant/runner/sink.rb b/lib/mutant/runner/sink.rb index c7a3844d..9d9530d3 100644 --- a/lib/mutant/runner/sink.rb +++ b/lib/mutant/runner/sink.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Runner class Sink diff --git a/lib/mutant/scope.rb b/lib/mutant/scope.rb index dc636b99..63ff9356 100644 --- a/lib/mutant/scope.rb +++ b/lib/mutant/scope.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Class or Module bound to an exact expression class Scope diff --git a/lib/mutant/selector.rb b/lib/mutant/selector.rb index d2fef7be..2d776e95 100644 --- a/lib/mutant/selector.rb +++ b/lib/mutant/selector.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Abstract base class for test selectors class Selector diff --git a/lib/mutant/selector/expression.rb b/lib/mutant/selector/expression.rb index 0e0a989a..8392e3a3 100644 --- a/lib/mutant/selector/expression.rb +++ b/lib/mutant/selector/expression.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Selector # Expression based test selector diff --git a/lib/mutant/subject.rb b/lib/mutant/subject.rb index b4ab876d..accdc7bd 100644 --- a/lib/mutant/subject.rb +++ b/lib/mutant/subject.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Subject of a mutation class Subject diff --git a/lib/mutant/subject/method.rb b/lib/mutant/subject/method.rb index 3fa3b493..8ab3995e 100644 --- a/lib/mutant/subject/method.rb +++ b/lib/mutant/subject/method.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Subject # Abstract base class for method subjects diff --git a/lib/mutant/subject/method/instance.rb b/lib/mutant/subject/method/instance.rb index 27fd8dd8..4e066d22 100644 --- a/lib/mutant/subject/method/instance.rb +++ b/lib/mutant/subject/method/instance.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Subject class Method diff --git a/lib/mutant/subject/method/singleton.rb b/lib/mutant/subject/method/singleton.rb index c3bc3593..2ec8b49a 100644 --- a/lib/mutant/subject/method/singleton.rb +++ b/lib/mutant/subject/method/singleton.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant class Subject class Method diff --git a/lib/mutant/test.rb b/lib/mutant/test.rb index c71d5aa2..39626392 100644 --- a/lib/mutant/test.rb +++ b/lib/mutant/test.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Abstract base class for test that might kill a mutation class Test diff --git a/lib/mutant/util.rb b/lib/mutant/util.rb index 847144bc..ad483abb 100644 --- a/lib/mutant/util.rb +++ b/lib/mutant/util.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Utility methods module Util diff --git a/lib/mutant/version.rb b/lib/mutant/version.rb index fc492072..dd5e853c 100644 --- a/lib/mutant/version.rb +++ b/lib/mutant/version.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Current mutant version VERSION = '0.8.16'.freeze diff --git a/lib/mutant/warning_filter.rb b/lib/mutant/warning_filter.rb index 7eed16df..275a1843 100644 --- a/lib/mutant/warning_filter.rb +++ b/lib/mutant/warning_filter.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Stream filter for warnings class WarningFilter diff --git a/lib/mutant/zombifier.rb b/lib/mutant/zombifier.rb index 0c53e604..174820c2 100644 --- a/lib/mutant/zombifier.rb +++ b/lib/mutant/zombifier.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module Mutant # Zombifier namespace class Zombifier diff --git a/meta/and.rb b/meta/and.rb index e7f5b31a..9d678fc5 100644 --- a/meta/and.rb +++ b/meta/and.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :and do source 'true and false' diff --git a/meta/and_asgn.rb b/meta/and_asgn.rb index 33f43b4f..852e5ef0 100644 --- a/meta/and_asgn.rb +++ b/meta/and_asgn.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :and_asgn do source 'a &&= 1' diff --git a/meta/array.rb b/meta/array.rb index 03a70dfe..75b43804 100644 --- a/meta/array.rb +++ b/meta/array.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :array do source '[true]' diff --git a/meta/begin.rb b/meta/begin.rb index d325f9a0..7a3356d6 100644 --- a/meta/begin.rb +++ b/meta/begin.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :begin do source 'true; false' diff --git a/meta/block.rb b/meta/block.rb index 06817801..1afadb69 100644 --- a/meta/block.rb +++ b/meta/block.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :block do source 'foo { a; b }' diff --git a/meta/block_pass.rb b/meta/block_pass.rb index 715e1899..e2330685 100644 --- a/meta/block_pass.rb +++ b/meta/block_pass.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :block_pass do source 'foo(&bar)' diff --git a/meta/blockarg.rb b/meta/blockarg.rb index 267a0c7c..03044e7b 100644 --- a/meta/blockarg.rb +++ b/meta/blockarg.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :blockarg do source 'foo { |&bar| }' diff --git a/meta/break.rb b/meta/break.rb index 1848bc25..f9b7f96a 100644 --- a/meta/break.rb +++ b/meta/break.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :break do source 'break true' diff --git a/meta/case.rb b/meta/case.rb index 24b86da3..4a95ddb0 100644 --- a/meta/case.rb +++ b/meta/case.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :case do source <<-RUBY case diff --git a/meta/casgn.rb b/meta/casgn.rb index bca5d649..b28bd518 100644 --- a/meta/casgn.rb +++ b/meta/casgn.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :casgn do source 'A = true' diff --git a/meta/cbase.rb b/meta/cbase.rb index 3a1ef0c6..078fa199 100644 --- a/meta/cbase.rb +++ b/meta/cbase.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :cbase do source '::A' diff --git a/meta/class.rb b/meta/class.rb index 2266ded8..189736b8 100644 --- a/meta/class.rb +++ b/meta/class.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :class do source 'class Foo; bar; end' diff --git a/meta/const.rb b/meta/const.rb index 893ceae9..cc794ee3 100644 --- a/meta/const.rb +++ b/meta/const.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :const do source 'A::B::C' diff --git a/meta/csend.rb b/meta/csend.rb index 59931a75..22ef3b19 100644 --- a/meta/csend.rb +++ b/meta/csend.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :csend do source 'a&.b' diff --git a/meta/cvar.rb b/meta/cvar.rb index 82b11fba..a7363b6d 100644 --- a/meta/cvar.rb +++ b/meta/cvar.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :cvar do source '@@a' diff --git a/meta/cvasgn.rb b/meta/cvasgn.rb index c32af925..14d0f28e 100644 --- a/meta/cvasgn.rb +++ b/meta/cvasgn.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :cvasgn do source '@@a = true' diff --git a/meta/date.rb b/meta/date.rb index 64bf3f80..c729a409 100644 --- a/meta/date.rb +++ b/meta/date.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :send do source 'Date.parse(nil)' diff --git a/meta/def.rb b/meta/def.rb index ae973d34..50e2ff7e 100644 --- a/meta/def.rb +++ b/meta/def.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :def do source 'def foo; end' diff --git a/meta/defined.rb b/meta/defined.rb index 689ca206..9e5cee91 100644 --- a/meta/defined.rb +++ b/meta/defined.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :defined? do source 'defined?(foo)' diff --git a/meta/dstr.rb b/meta/dstr.rb index 3849bacf..1c6054a3 100644 --- a/meta/dstr.rb +++ b/meta/dstr.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :dstr do source '"foo#{bar}baz"' diff --git a/meta/dsym.rb b/meta/dsym.rb index 146798d3..3582a9c1 100644 --- a/meta/dsym.rb +++ b/meta/dsym.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :dsym do source ':"foo#{bar}baz"' diff --git a/meta/ensure.rb b/meta/ensure.rb index 1cd16fda..4c79cffa 100644 --- a/meta/ensure.rb +++ b/meta/ensure.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :ensure do source 'begin; rescue; ensure; true; end' diff --git a/meta/false.rb b/meta/false.rb index f1907cf6..002aad0f 100644 --- a/meta/false.rb +++ b/meta/false.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :false do source 'false' diff --git a/meta/float.rb b/meta/float.rb index 5ec02b2b..428e0d9c 100644 --- a/meta/float.rb +++ b/meta/float.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :float do source '10.0' diff --git a/meta/gvar.rb b/meta/gvar.rb index b58075a3..d4d4ba04 100644 --- a/meta/gvar.rb +++ b/meta/gvar.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :gvar do source '$a' diff --git a/meta/gvasgn.rb b/meta/gvasgn.rb index d536e4a8..810964c9 100644 --- a/meta/gvasgn.rb +++ b/meta/gvasgn.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :gvasgn do source '$a = true' diff --git a/meta/hash.rb b/meta/hash.rb index 7a1c512a..154d830c 100644 --- a/meta/hash.rb +++ b/meta/hash.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :hash do source '{true => true, false => false}' diff --git a/meta/if.rb b/meta/if.rb index 1137b637..21d9b564 100644 --- a/meta/if.rb +++ b/meta/if.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :if do source 'if condition; true; else false; end' diff --git a/meta/int.rb b/meta/int.rb index abf24281..a7b90e7f 100644 --- a/meta/int.rb +++ b/meta/int.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :int do source '10' diff --git a/meta/ivar.rb b/meta/ivar.rb index 86a51397..d4e33c94 100644 --- a/meta/ivar.rb +++ b/meta/ivar.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :ivar do source '@foo' diff --git a/meta/ivasgn.rb b/meta/ivasgn.rb index f79aaf42..f0536cdd 100644 --- a/meta/ivasgn.rb +++ b/meta/ivasgn.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :ivasgn do source '@a = true' diff --git a/meta/kwarg.rb b/meta/kwarg.rb index 82b6f0fb..2a4f8146 100644 --- a/meta/kwarg.rb +++ b/meta/kwarg.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :kwarg do source 'def foo(bar:); end' diff --git a/meta/kwbegin.rb b/meta/kwbegin.rb index 3f8d7dd9..a5b8d8df 100644 --- a/meta/kwbegin.rb +++ b/meta/kwbegin.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :kwbegin do source 'begin; true; end' diff --git a/meta/kwoptarg.rb b/meta/kwoptarg.rb index 28b2619b..dcb72a64 100644 --- a/meta/kwoptarg.rb +++ b/meta/kwoptarg.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :kwarg do source 'def foo(bar: baz); end' diff --git a/meta/lvar.rb b/meta/lvar.rb index 718d18aa..15872038 100644 --- a/meta/lvar.rb +++ b/meta/lvar.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :lvar do source 'a = nil; a' diff --git a/meta/lvasgn.rb b/meta/lvasgn.rb index ef4772e0..1ba9e190 100644 --- a/meta/lvasgn.rb +++ b/meta/lvasgn.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :lvasgn do source 'a = true' diff --git a/meta/masgn.rb b/meta/masgn.rb index 85ded623..2e677a56 100644 --- a/meta/masgn.rb +++ b/meta/masgn.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :masgn do source 'a, b = c, d' diff --git a/meta/match_current_line.rb b/meta/match_current_line.rb index c7215ceb..a244b54a 100644 --- a/meta/match_current_line.rb +++ b/meta/match_current_line.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :match_current_line do source 'true if /foo/' diff --git a/meta/next.rb b/meta/next.rb index 3206be8d..a71b3996 100644 --- a/meta/next.rb +++ b/meta/next.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :next do source 'next true' diff --git a/meta/nil.rb b/meta/nil.rb index 73a829fd..9135863a 100644 --- a/meta/nil.rb +++ b/meta/nil.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :nil do source 'nil' end diff --git a/meta/nthref.rb b/meta/nthref.rb index 4f33c1aa..580d212f 100644 --- a/meta/nthref.rb +++ b/meta/nthref.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :nth_ref do source '$1' diff --git a/meta/op_assgn.rb b/meta/op_assgn.rb index 4238c369..a4d442b5 100644 --- a/meta/op_assgn.rb +++ b/meta/op_assgn.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :op_asgn do source '@a.b += 1' diff --git a/meta/or.rb b/meta/or.rb index 9f1ee0db..0e55f200 100644 --- a/meta/or.rb +++ b/meta/or.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :or do source 'true or false' diff --git a/meta/or_asgn.rb b/meta/or_asgn.rb index 49622347..02cfc43b 100644 --- a/meta/or_asgn.rb +++ b/meta/or_asgn.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :or_asgn do source 'a ||= 1' diff --git a/meta/range.rb b/meta/range.rb index dc451047..e14b81a3 100644 --- a/meta/range.rb +++ b/meta/range.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :irange do source '1..100' diff --git a/meta/redo.rb b/meta/redo.rb index 12268dc3..e595f6c9 100644 --- a/meta/redo.rb +++ b/meta/redo.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :redo do source 'redo' end diff --git a/meta/regexp.rb b/meta/regexp.rb index c868e3a5..a4b3215a 100644 --- a/meta/regexp.rb +++ b/meta/regexp.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :regexp do source '/foo/' diff --git a/meta/regexp/character_types.rb b/meta/regexp/character_types.rb index ecb3e283..fc83971d 100644 --- a/meta/regexp/character_types.rb +++ b/meta/regexp/character_types.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + mutations = { [:regexp_digit_type, '/\d/'] => [:regexp_nondigit_type, '/\D/'], [:regexp_hex_type, '/\h/'] => [:regexp_nonhex_type, '/\H/'], diff --git a/meta/regexp/regexp_alternation_meta.rb b/meta/regexp/regexp_alternation_meta.rb index 76c239af..d2623e75 100644 --- a/meta/regexp/regexp_alternation_meta.rb +++ b/meta/regexp/regexp_alternation_meta.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :regexp_alternation_meta do source '/\A(foo|bar|baz)\z/' diff --git a/meta/regexp/regexp_bol_anchor.rb b/meta/regexp/regexp_bol_anchor.rb index 7cd51e93..45082a18 100644 --- a/meta/regexp/regexp_bol_anchor.rb +++ b/meta/regexp/regexp_bol_anchor.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :regexp_bol_anchor do source '/^/' diff --git a/meta/regexp/regexp_bos_anchor.rb b/meta/regexp/regexp_bos_anchor.rb index b1dce505..7f46aed0 100644 --- a/meta/regexp/regexp_bos_anchor.rb +++ b/meta/regexp/regexp_bos_anchor.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :regexp_bos_anchor do source '/\A/' diff --git a/meta/regexp/regexp_capture_group.rb b/meta/regexp/regexp_capture_group.rb index 24d28fff..fe986dbb 100644 --- a/meta/regexp/regexp_capture_group.rb +++ b/meta/regexp/regexp_capture_group.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :regexp_capture_group do source '/()/' diff --git a/meta/regexp/regexp_eol_anchor.rb b/meta/regexp/regexp_eol_anchor.rb index f34de4a3..dcff6485 100644 --- a/meta/regexp/regexp_eol_anchor.rb +++ b/meta/regexp/regexp_eol_anchor.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :regexp_eol_anchor do source '/$/' diff --git a/meta/regexp/regexp_eos_anchor.rb b/meta/regexp/regexp_eos_anchor.rb index b0ca0ff2..ab936210 100644 --- a/meta/regexp/regexp_eos_anchor.rb +++ b/meta/regexp/regexp_eos_anchor.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :regexp_eos_anchor do source '/\z/' diff --git a/meta/regexp/regexp_eos_ob_eol_anchor.rb b/meta/regexp/regexp_eos_ob_eol_anchor.rb index 7ef8b2f2..08e62df6 100644 --- a/meta/regexp/regexp_eos_ob_eol_anchor.rb +++ b/meta/regexp/regexp_eos_ob_eol_anchor.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :regexp_eos_ob_eol_anchor do source '/\Z/' diff --git a/meta/regexp/regexp_greedy_zero_or_more.rb b/meta/regexp/regexp_greedy_zero_or_more.rb index 21f49b7e..f248c17d 100644 --- a/meta/regexp/regexp_greedy_zero_or_more.rb +++ b/meta/regexp/regexp_greedy_zero_or_more.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :regexp_greedy_zero_or_more do source '/\d*/' diff --git a/meta/regexp/regexp_root_expression.rb b/meta/regexp/regexp_root_expression.rb index 004c8aed..95e8bfcf 100644 --- a/meta/regexp/regexp_root_expression.rb +++ b/meta/regexp/regexp_root_expression.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :regexp_root_expression do source '/^/' diff --git a/meta/regopt.rb b/meta/regopt.rb index 85df9dfc..34669b2f 100644 --- a/meta/regopt.rb +++ b/meta/regopt.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :regopt do source '/foo/ixom' diff --git a/meta/rescue.rb b/meta/rescue.rb index af5bf660..fbcf0940 100644 --- a/meta/rescue.rb +++ b/meta/rescue.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :rescue do source 'begin; rescue ExceptionA, ExceptionB => error; true; end' diff --git a/meta/restarg.rb b/meta/restarg.rb index 91d1a3ca..5319bfdf 100644 --- a/meta/restarg.rb +++ b/meta/restarg.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :restarg do source 'def foo(*bar); end' diff --git a/meta/return.rb b/meta/return.rb index c1ed9bc2..e879297d 100644 --- a/meta/return.rb +++ b/meta/return.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :return do source 'return' diff --git a/meta/self.rb b/meta/self.rb index ffef2e99..c3056f4d 100644 --- a/meta/self.rb +++ b/meta/self.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :self do source 'self' diff --git a/meta/send.rb b/meta/send.rb index e58b7a90..acdc1ab0 100644 --- a/meta/send.rb +++ b/meta/send.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :send do source 'a > b' diff --git a/meta/str.rb b/meta/str.rb index 4624cef5..338e4e5f 100644 --- a/meta/str.rb +++ b/meta/str.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :str do source '"foo"' diff --git a/meta/super.rb b/meta/super.rb index 2a31d0ff..1f1b3ba7 100644 --- a/meta/super.rb +++ b/meta/super.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :super do source 'super' diff --git a/meta/sym.rb b/meta/sym.rb index d304da3c..ef429f52 100644 --- a/meta/sym.rb +++ b/meta/sym.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :sym do source ':foo' diff --git a/meta/true.rb b/meta/true.rb index 85a1fe9d..00cdbf2a 100644 --- a/meta/true.rb +++ b/meta/true.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :true do source 'true' diff --git a/meta/until.rb b/meta/until.rb index eabef533..e609584c 100644 --- a/meta/until.rb +++ b/meta/until.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :until do source 'until true; foo; bar; end' diff --git a/meta/while.rb b/meta/while.rb index 1deac1be..016cf305 100644 --- a/meta/while.rb +++ b/meta/while.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :while do source 'while true; foo; bar; end' diff --git a/meta/yield.rb b/meta/yield.rb index 582b2bc7..6b71b3ea 100644 --- a/meta/yield.rb +++ b/meta/yield.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example.add :yield do source 'yield true' diff --git a/mutant-rspec.gemspec b/mutant-rspec.gemspec index 0e32b5cf..ca220c39 100644 --- a/mutant-rspec.gemspec +++ b/mutant-rspec.gemspec @@ -1,5 +1,6 @@ # frozen_string_literal: true -require File.expand_path('../lib/mutant/version', __FILE__) + +require File.expand_path('lib/mutant/version', __dir__) Gem::Specification.new do |gem| gem.name = 'mutant-rspec' diff --git a/mutant.gemspec b/mutant.gemspec index 39c56043..58c5c53a 100644 --- a/mutant.gemspec +++ b/mutant.gemspec @@ -1,5 +1,6 @@ # frozen_string_literal: true -require File.expand_path('../lib/mutant/version', __FILE__) + +require File.expand_path('lib/mutant/version', __dir__) Gem::Specification.new do |gem| gem.name = 'mutant' @@ -20,7 +21,7 @@ Gem::Specification.new do |gem| gem.extra_rdoc_files = %w[LICENSE] gem.executables = %w[mutant] - gem.required_ruby_version = '>= 2.1' + gem.required_ruby_version = '>= 2.3' gem.add_runtime_dependency('abstract_type', '~> 0.0.7') gem.add_runtime_dependency('adamantium', '~> 0.2.0') @@ -33,12 +34,12 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency('memoizable', '~> 0.4.2') gem.add_runtime_dependency('morpher', '~> 0.2.6') gem.add_runtime_dependency('parallel', '~> 1.3') - gem.add_runtime_dependency('parser', '>= 2.3.1.4', '< 2.5') + gem.add_runtime_dependency('parser', '~> 2.5.1') gem.add_runtime_dependency('procto', '~> 0.0.2') gem.add_runtime_dependency('regexp_parser', '~> 0.4.9') gem.add_runtime_dependency('unparser', '~> 0.2.5') gem.add_development_dependency('bundler', '~> 1.10') - gem.add_development_dependency('devtools', '~> 0.1.12') + gem.add_development_dependency('devtools', '~> 0.1.21') gem.add_development_dependency('ffi', '~> 1.9.6') end diff --git a/spec/integration/mutant/corpus_spec.rb b/spec/integration/mutant/corpus_spec.rb index ceeb42f9..08abe967 100644 --- a/spec/integration/mutant/corpus_spec.rb +++ b/spec/integration/mutant/corpus_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe 'Mutant on ruby corpus', mutant: false do before do diff --git a/spec/integration/mutant/isolation/fork_spec.rb b/spec/integration/mutant/isolation/fork_spec.rb index 27da10e2..743478b6 100644 --- a/spec/integration/mutant/isolation/fork_spec.rb +++ b/spec/integration/mutant/isolation/fork_spec.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true + RSpec.describe Mutant::Isolation::Fork, mutant: false do + # rubocop:disable Lint/AmbiguousBlockAssociation specify do a = 1 expect do diff --git a/spec/integration/mutant/null_spec.rb b/spec/integration/mutant/null_spec.rb index eaafafa4..2bcad447 100644 --- a/spec/integration/mutant/null_spec.rb +++ b/spec/integration/mutant/null_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe 'null integration', mutant: false do let(:base_cmd) { 'bundle exec mutant -I lib --require test_app "TestApp*"' } diff --git a/spec/integration/mutant/rspec_spec.rb b/spec/integration/mutant/rspec_spec.rb index 120cca37..359391f7 100644 --- a/spec/integration/mutant/rspec_spec.rb +++ b/spec/integration/mutant/rspec_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe 'rspec integration', mutant: false do let(:base_cmd) { 'bundle exec mutant -I lib --require test_app --use rspec' } diff --git a/spec/integration/mutant/test_mutator_handles_types_spec.rb b/spec/integration/mutant/test_mutator_handles_types_spec.rb index a7a607cb..ff925632 100644 --- a/spec/integration/mutant/test_mutator_handles_types_spec.rb +++ b/spec/integration/mutant/test_mutator_handles_types_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe 'AST type coverage', mutant: false do specify 'mutant should not crash for any node parser can generate' do Mutant::AST::Types::ALL.each do |type| diff --git a/spec/shared/framework_integration_behavior.rb b/spec/shared/framework_integration_behavior.rb index 36f3de40..ee522471 100644 --- a/spec/shared/framework_integration_behavior.rb +++ b/spec/shared/framework_integration_behavior.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.shared_examples_for 'framework integration' do def system_with_gemfile(*command) Kernel.system({ 'BUNDLE_GEMFILE' => gemfile }, *command) diff --git a/spec/shared/method_matcher_behavior.rb b/spec/shared/method_matcher_behavior.rb index d03669ac..6be8d355 100644 --- a/spec/shared/method_matcher_behavior.rb +++ b/spec/shared/method_matcher_behavior.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.shared_examples_for 'a method matcher' do let(:node) { mutation_subject.node } let(:context) { mutation_subject.context } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e0abe295..a7905229 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + if ENV['COVERAGE'] == 'true' require 'simplecov' diff --git a/spec/support/corpus.rb b/spec/support/corpus.rb index 3eae41e8..8b31c39b 100644 --- a/spec/support/corpus.rb +++ b/spec/support/corpus.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'morpher' require 'anima' require 'mutant' diff --git a/spec/support/fake_actor.rb b/spec/support/fake_actor.rb index cb6929fc..ddc377bf 100644 --- a/spec/support/fake_actor.rb +++ b/spec/support/fake_actor.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'mutant/actor' # A fake actor used from specs diff --git a/spec/support/file_system.rb b/spec/support/file_system.rb index f81f5511..b53b6b78 100644 --- a/spec/support/file_system.rb +++ b/spec/support/file_system.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module MutantSpec class FileState DEFAULTS = IceNine.deep_freeze( diff --git a/spec/support/ice_nine_config.rb b/spec/support/ice_nine_config.rb index dd557ed1..828c22a2 100644 --- a/spec/support/ice_nine_config.rb +++ b/spec/support/ice_nine_config.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'ice_nine' module IceNine diff --git a/spec/support/rb_bug.rb b/spec/support/rb_bug.rb index a2b068aa..557137db 100644 --- a/spec/support/rb_bug.rb +++ b/spec/support/rb_bug.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'ffi' # @api private diff --git a/spec/support/ruby_vm.rb b/spec/support/ruby_vm.rb index 516aa60c..e43973b0 100644 --- a/spec/support/ruby_vm.rb +++ b/spec/support/ruby_vm.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module MutantSpec # Not a real VM, just kidding. It connects the require / eval triggers # require semantics Zombifier relies on in a way we can avoid having to @@ -25,6 +26,7 @@ module MutantSpec super(DEFAULTS.merge(attributes)) end + # rubocop:disable Naming/UncommunicativeMethodParamName def handle(vm, observation) unless match?(observation) fail "Unexpected event observation: #{observation.inspect}, expected #{inspect}" diff --git a/spec/support/shared_context.rb b/spec/support/shared_context.rb index 9ac65022..450455d8 100644 --- a/spec/support/shared_context.rb +++ b/spec/support/shared_context.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # rubocop:disable ModuleLength module SharedContext # Prepend an anonymous module with the new `with` method diff --git a/spec/support/test_app.rb b/spec/support/test_app.rb index 5987b4eb..6c8ed76a 100644 --- a/spec/support/test_app.rb +++ b/spec/support/test_app.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true + module TestApp def self.root - File.expand_path('../../../test_app', __FILE__) + File.expand_path('../../test_app', __dir__) end end # TestApp diff --git a/spec/support/warning.rb b/spec/support/warning.rb index 9183984f..a5119d1c 100644 --- a/spec/support/warning.rb +++ b/spec/support/warning.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'yaml' require 'equalizer' require 'memoizable' diff --git a/spec/support/warnings.yml b/spec/support/warnings.yml index 1b859f45..415dce7b 100644 --- a/spec/support/warnings.yml +++ b/spec/support/warnings.yml @@ -2,7 +2,7 @@ - "lib/mutant/subject/method/instance.rb:9: warning: undefining `initialize' may cause serious problems" - 'lib/parallel.rb:222: warning: shadowing outer local variable - args' - 'lib/parallel.rb:227: warning: shadowing outer local variable - args' -- 'lib/parser/lexer.rb:10922: warning: assigned but unused variable - testEof' +- 'lib/parser/lexer.rb:10836: warning: assigned but unused variable - testEof' - 'lib/regexp_parser/scanner.rb:1675: warning: assigned but unused variable - testEof' - 'lib/regexp_parser/scanner.rb:1689: warning: assigned but unused variable - testEof' - 'lib/regexp_parser/scanner.rb:1692: warning: assigned but unused variable - testEof' diff --git a/spec/support/xspec.rb b/spec/support/xspec.rb index 8e7f7615..fef28c5b 100644 --- a/spec/support/xspec.rb +++ b/spec/support/xspec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module XSpec class MessageReaction include Concord.new(:event_list) @@ -27,11 +28,11 @@ module XSpec private - def return(_, value) + def return(_event, value) value end - def exception(_, exception) + def exception(_event, exception) fail exception end diff --git a/spec/unit/mutant/actor/binding_spec.rb b/spec/unit/mutant/actor/binding_spec.rb index e9a2750b..55903a70 100644 --- a/spec/unit/mutant/actor/binding_spec.rb +++ b/spec/unit/mutant/actor/binding_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Actor::Binding do let(:actor_a) { instance_double(Mutant::Actor::Mailbox, sender: sender_a, receiver: receiver_a) } let(:sender_a) { instance_double(Mutant::Actor::Sender) } diff --git a/spec/unit/mutant/actor/env_spec.rb b/spec/unit/mutant/actor/env_spec.rb index c7f088e6..5aa55309 100644 --- a/spec/unit/mutant/actor/env_spec.rb +++ b/spec/unit/mutant/actor/env_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Actor::Env do let(:thread) { instance_double(Thread) } let(:thread_root) { class_double(Thread) } diff --git a/spec/unit/mutant/actor/mailbox_spec.rb b/spec/unit/mutant/actor/mailbox_spec.rb index ca1a38cc..6e865370 100644 --- a/spec/unit/mutant/actor/mailbox_spec.rb +++ b/spec/unit/mutant/actor/mailbox_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Actor::Mailbox do let(:mutex) { instance_double(Mutex) } let(:condition_variable) { instance_double(ConditionVariable) } diff --git a/spec/unit/mutant/actor/message_spec.rb b/spec/unit/mutant/actor/message_spec.rb index c570ce3d..b27f0cf1 100644 --- a/spec/unit/mutant/actor/message_spec.rb +++ b/spec/unit/mutant/actor/message_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Actor::Message do let(:type) { instance_double(Symbol) } diff --git a/spec/unit/mutant/actor/receiver_spec.rb b/spec/unit/mutant/actor/receiver_spec.rb index 24e5cf16..4e7cf26c 100644 --- a/spec/unit/mutant/actor/receiver_spec.rb +++ b/spec/unit/mutant/actor/receiver_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Actor::Receiver do let(:messages) { instance_double(Array) } let(:mutex) { instance_double(Mutex) } diff --git a/spec/unit/mutant/actor/sender_spec.rb b/spec/unit/mutant/actor/sender_spec.rb index 7e1d077a..602fba75 100644 --- a/spec/unit/mutant/actor/sender_spec.rb +++ b/spec/unit/mutant/actor/sender_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Actor::Sender do let(:object) { described_class.new(condition_variable, mutex, messages) } diff --git a/spec/unit/mutant/ast/meta/optarg_spec.rb b/spec/unit/mutant/ast/meta/optarg_spec.rb index 4553b04e..01bde499 100644 --- a/spec/unit/mutant/ast/meta/optarg_spec.rb +++ b/spec/unit/mutant/ast/meta/optarg_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::AST::Meta::Optarg do subject(:object) { described_class.new(node) } diff --git a/spec/unit/mutant/ast/meta/send/proc_predicate_spec.rb b/spec/unit/mutant/ast/meta/send/proc_predicate_spec.rb index 2b99be54..b3f8ad4d 100644 --- a/spec/unit/mutant/ast/meta/send/proc_predicate_spec.rb +++ b/spec/unit/mutant/ast/meta/send/proc_predicate_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::AST::Meta::Send, '#proc?' do subject { described_class.new(node).proc? } diff --git a/spec/unit/mutant/ast/meta/send/receiver_possible_top_level_const_predicate_spec.rb b/spec/unit/mutant/ast/meta/send/receiver_possible_top_level_const_predicate_spec.rb index 29709195..cb1e3878 100644 --- a/spec/unit/mutant/ast/meta/send/receiver_possible_top_level_const_predicate_spec.rb +++ b/spec/unit/mutant/ast/meta/send/receiver_possible_top_level_const_predicate_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::AST::Meta::Send, '#receiver_possible_top_level_const?' do subject { described_class.new(node).receiver_possible_top_level_const? } diff --git a/spec/unit/mutant/ast/meta/send_spec.rb b/spec/unit/mutant/ast/meta/send_spec.rb index 43ae88a4..2188a4b7 100644 --- a/spec/unit/mutant/ast/meta/send_spec.rb +++ b/spec/unit/mutant/ast/meta/send_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::AST::Meta::Send do let(:object) { described_class.new(node) } diff --git a/spec/unit/mutant/ast/named_children_spec.rb b/spec/unit/mutant/ast/named_children_spec.rb index 53b599a1..4c81e565 100644 --- a/spec/unit/mutant/ast/named_children_spec.rb +++ b/spec/unit/mutant/ast/named_children_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::AST::NamedChildren do describe '.included' do let(:klass) do diff --git a/spec/unit/mutant/ast/regexp/parse_spec.rb b/spec/unit/mutant/ast/regexp/parse_spec.rb index 69a76345..3094b64e 100644 --- a/spec/unit/mutant/ast/regexp/parse_spec.rb +++ b/spec/unit/mutant/ast/regexp/parse_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::AST::Regexp, '.parse' do it 'parses using minor ruby version' do expect(described_class.parse(/foo/).to_re).to eql(/foo/) diff --git a/spec/unit/mutant/ast/regexp/supported_predicate_spec.rb b/spec/unit/mutant/ast/regexp/supported_predicate_spec.rb index 13275166..555a0263 100644 --- a/spec/unit/mutant/ast/regexp/supported_predicate_spec.rb +++ b/spec/unit/mutant/ast/regexp/supported_predicate_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::AST::Regexp, '.supported?' do subject { described_class.supported?(expression) } diff --git a/spec/unit/mutant/ast/regexp/transformer/lookup_table/table_spec.rb b/spec/unit/mutant/ast/regexp/transformer/lookup_table/table_spec.rb index 673cbf3b..7a4981c9 100644 --- a/spec/unit/mutant/ast/regexp/transformer/lookup_table/table_spec.rb +++ b/spec/unit/mutant/ast/regexp/transformer/lookup_table/table_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::AST::Regexp::Transformer::LookupTable::Table do subject { table.lookup(:regexp_fake_thing) } diff --git a/spec/unit/mutant/ast/regexp/transformer/lookup_table_spec.rb b/spec/unit/mutant/ast/regexp/transformer/lookup_table_spec.rb index 8c541d2a..848e323f 100644 --- a/spec/unit/mutant/ast/regexp/transformer/lookup_table_spec.rb +++ b/spec/unit/mutant/ast/regexp/transformer/lookup_table_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::AST::Regexp::Transformer::LookupTable do subject(:pair) { mapper.new(s(:regexp_fake)).pair } diff --git a/spec/unit/mutant/ast/regexp/transformer_spec.rb b/spec/unit/mutant/ast/regexp/transformer_spec.rb index a1feb8db..aab88131 100644 --- a/spec/unit/mutant/ast/regexp/transformer_spec.rb +++ b/spec/unit/mutant/ast/regexp/transformer_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::AST::Regexp::Transformer do before do stub_const("#{described_class}::REGISTRY", Mutant::Registry.new) diff --git a/spec/unit/mutant/ast/regexp_spec.rb b/spec/unit/mutant/ast/regexp_spec.rb index 3212ec9f..4c83cbc2 100644 --- a/spec/unit/mutant/ast/regexp_spec.rb +++ b/spec/unit/mutant/ast/regexp_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + module RegexpSpec class Expression < SimpleDelegator NO_EXPRESSIONS = Object.new.freeze diff --git a/spec/unit/mutant/ast/sexp_spec.rb b/spec/unit/mutant/ast/sexp_spec.rb index e2ec424f..49164a10 100644 --- a/spec/unit/mutant/ast/sexp_spec.rb +++ b/spec/unit/mutant/ast/sexp_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::AST::Sexp do let(:object) do Class.new do diff --git a/spec/unit/mutant/ast_spec.rb b/spec/unit/mutant/ast_spec.rb index d4da4ab7..bb8338e8 100644 --- a/spec/unit/mutant/ast_spec.rb +++ b/spec/unit/mutant/ast_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::AST do let(:object) { described_class } diff --git a/spec/unit/mutant/cli_spec.rb b/spec/unit/mutant/cli_spec.rb index dd72e84e..775f8a09 100644 --- a/spec/unit/mutant/cli_spec.rb +++ b/spec/unit/mutant/cli_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::CLI do let(:object) { described_class } diff --git a/spec/unit/mutant/context_spec.rb b/spec/unit/mutant/context_spec.rb index c287e620..d64b53ad 100644 --- a/spec/unit/mutant/context_spec.rb +++ b/spec/unit/mutant/context_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Context do describe '.wrap' do subject { described_class.wrap(scope, node) } diff --git a/spec/unit/mutant/diff_spec.rb b/spec/unit/mutant/diff_spec.rb index 5d0416fe..37c09e8c 100644 --- a/spec/unit/mutant/diff_spec.rb +++ b/spec/unit/mutant/diff_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Diff do let(:object) { described_class } diff --git a/spec/unit/mutant/env/bootstrap_spec.rb b/spec/unit/mutant/env/bootstrap_spec.rb index 31d50284..36cebeeb 100644 --- a/spec/unit/mutant/env/bootstrap_spec.rb +++ b/spec/unit/mutant/env/bootstrap_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # This spec is a good example for: # # If test look that ugly the class under test sucks. diff --git a/spec/unit/mutant/env_spec.rb b/spec/unit/mutant/env_spec.rb index 3c3a99bb..e2549e99 100644 --- a/spec/unit/mutant/env_spec.rb +++ b/spec/unit/mutant/env_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Env do context '#kill' do let(:object) do diff --git a/spec/unit/mutant/expression/method_spec.rb b/spec/unit/mutant/expression/method_spec.rb index b9ecbf71..198bf7ed 100644 --- a/spec/unit/mutant/expression/method_spec.rb +++ b/spec/unit/mutant/expression/method_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Expression::Method do let(:object) { parse_expression(input) } let(:env) { Fixtures::TEST_ENV } diff --git a/spec/unit/mutant/expression/methods_spec.rb b/spec/unit/mutant/expression/methods_spec.rb index 7c9dcd91..778a6c37 100644 --- a/spec/unit/mutant/expression/methods_spec.rb +++ b/spec/unit/mutant/expression/methods_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Expression::Methods do let(:object) { described_class.new(attributes) } diff --git a/spec/unit/mutant/expression/namespace/exact_spec.rb b/spec/unit/mutant/expression/namespace/exact_spec.rb index dc2704db..b5aaeba6 100644 --- a/spec/unit/mutant/expression/namespace/exact_spec.rb +++ b/spec/unit/mutant/expression/namespace/exact_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Expression::Namespace::Exact do let(:object) { parse_expression(input) } let(:input) { 'TestApp::Literal' } diff --git a/spec/unit/mutant/expression/namespace/recursive_spec.rb b/spec/unit/mutant/expression/namespace/recursive_spec.rb index c744c40f..dc967314 100644 --- a/spec/unit/mutant/expression/namespace/recursive_spec.rb +++ b/spec/unit/mutant/expression/namespace/recursive_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Expression::Namespace::Recursive do let(:object) { parse_expression(input) } let(:input) { 'TestApp::Literal*' } diff --git a/spec/unit/mutant/expression/parser_spec.rb b/spec/unit/mutant/expression/parser_spec.rb index 71a0d1ab..ed7ece23 100644 --- a/spec/unit/mutant/expression/parser_spec.rb +++ b/spec/unit/mutant/expression/parser_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Expression::Parser do let(:object) { Mutant::Config::DEFAULT.expression_parser } diff --git a/spec/unit/mutant/expression_spec.rb b/spec/unit/mutant/expression_spec.rb index fd39f39e..bc82f7a7 100644 --- a/spec/unit/mutant/expression_spec.rb +++ b/spec/unit/mutant/expression_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Expression do let(:parser) { Mutant::Config::DEFAULT.expression_parser } diff --git a/spec/unit/mutant/integration/rspec_spec.rb b/spec/unit/mutant/integration/rspec_spec.rb index ce0472eb..d6d5cdde 100644 --- a/spec/unit/mutant/integration/rspec_spec.rb +++ b/spec/unit/mutant/integration/rspec_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require 'mutant/integration/rspec' RSpec.describe Mutant::Integration::Rspec do diff --git a/spec/unit/mutant/integration_spec.rb b/spec/unit/mutant/integration_spec.rb index d8858113..c4e4e93e 100644 --- a/spec/unit/mutant/integration_spec.rb +++ b/spec/unit/mutant/integration_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Integration do let(:class_under_test) do diff --git a/spec/unit/mutant/isolation/fork_spec.rb b/spec/unit/mutant/isolation/fork_spec.rb index cfd09832..6f5440df 100644 --- a/spec/unit/mutant/isolation/fork_spec.rb +++ b/spec/unit/mutant/isolation/fork_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # The fork isolation is all about managing a series of systemcalls with proper error handling # # So creating a unit spec for this is challenging. Especially under mutation testing. diff --git a/spec/unit/mutant/isolation/none_spec.rb b/spec/unit/mutant/isolation/none_spec.rb index 0b159324..bd3c3767 100644 --- a/spec/unit/mutant/isolation/none_spec.rb +++ b/spec/unit/mutant/isolation/none_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Isolation::None do describe '.call' do let(:object) { described_class.new } diff --git a/spec/unit/mutant/loader_spec.rb b/spec/unit/mutant/loader_spec.rb index 54897daf..2fa780e0 100644 --- a/spec/unit/mutant/loader_spec.rb +++ b/spec/unit/mutant/loader_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Loader, '.call' do subject do described_class.call( diff --git a/spec/unit/mutant/matcher/chain_spec.rb b/spec/unit/mutant/matcher/chain_spec.rb index ad2806ba..c887def9 100644 --- a/spec/unit/mutant/matcher/chain_spec.rb +++ b/spec/unit/mutant/matcher/chain_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Matcher::Chain, '#call' do subject { object.call(env) } diff --git a/spec/unit/mutant/matcher/compiler/subject_prefix_spec.rb b/spec/unit/mutant/matcher/compiler/subject_prefix_spec.rb index 4727536a..e99b1a43 100644 --- a/spec/unit/mutant/matcher/compiler/subject_prefix_spec.rb +++ b/spec/unit/mutant/matcher/compiler/subject_prefix_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Matcher::Compiler::SubjectPrefix, '#call' do let(:object) { described_class.new(parse_expression('Foo*')) } diff --git a/spec/unit/mutant/matcher/compiler_spec.rb b/spec/unit/mutant/matcher/compiler_spec.rb index b2fced2c..db69fae0 100644 --- a/spec/unit/mutant/matcher/compiler_spec.rb +++ b/spec/unit/mutant/matcher/compiler_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Matcher::Compiler, '#call' do let(:object) { described_class } let(:matcher_config) { Mutant::Matcher::Config::DEFAULT } diff --git a/spec/unit/mutant/matcher/config_spec.rb b/spec/unit/mutant/matcher/config_spec.rb index dc825cfb..2a340c12 100644 --- a/spec/unit/mutant/matcher/config_spec.rb +++ b/spec/unit/mutant/matcher/config_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Matcher::Config do describe '#inspect' do subject { object.inspect } diff --git a/spec/unit/mutant/matcher/filter_spec.rb b/spec/unit/mutant/matcher/filter_spec.rb index e9f7f081..f825411f 100644 --- a/spec/unit/mutant/matcher/filter_spec.rb +++ b/spec/unit/mutant/matcher/filter_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Matcher::Filter, '#call' do subject { object.call(env) } diff --git a/spec/unit/mutant/matcher/method/instance_spec.rb b/spec/unit/mutant/matcher/method/instance_spec.rb index e5d7b0bf..cc77f5b0 100644 --- a/spec/unit/mutant/matcher/method/instance_spec.rb +++ b/spec/unit/mutant/matcher/method/instance_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Matcher::Method::Instance, '#call' do subject { object.call(env) } diff --git a/spec/unit/mutant/matcher/method/singleton_spec.rb b/spec/unit/mutant/matcher/method/singleton_spec.rb index d9564bf8..0dd9b5c3 100644 --- a/spec/unit/mutant/matcher/method/singleton_spec.rb +++ b/spec/unit/mutant/matcher/method/singleton_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Matcher::Method::Singleton, '#call' do subject { object.call(env) } diff --git a/spec/unit/mutant/matcher/methods/instance_spec.rb b/spec/unit/mutant/matcher/methods/instance_spec.rb index efdd2782..c9792b4e 100644 --- a/spec/unit/mutant/matcher/methods/instance_spec.rb +++ b/spec/unit/mutant/matcher/methods/instance_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Matcher::Methods::Instance, '#call' do let(:object) { described_class.new(class_under_test) } let(:env) { Fixtures::TEST_ENV } diff --git a/spec/unit/mutant/matcher/methods/singleton_spec.rb b/spec/unit/mutant/matcher/methods/singleton_spec.rb index d223f423..4311ff28 100644 --- a/spec/unit/mutant/matcher/methods/singleton_spec.rb +++ b/spec/unit/mutant/matcher/methods/singleton_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Matcher::Methods::Singleton, '#call' do let(:object) { described_class.new(class_under_test) } let(:env) { Fixtures::TEST_ENV } diff --git a/spec/unit/mutant/matcher/namespace_spec.rb b/spec/unit/mutant/matcher/namespace_spec.rb index e15ec3da..f127a6b1 100644 --- a/spec/unit/mutant/matcher/namespace_spec.rb +++ b/spec/unit/mutant/matcher/namespace_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Matcher::Namespace, '#call' do let(:object) { described_class.new(parse_expression('TestApp*')) } let(:env) { instance_double(Mutant::Env) } diff --git a/spec/unit/mutant/matcher/null_spec.rb b/spec/unit/mutant/matcher/null_spec.rb index ad469188..3abbaef5 100644 --- a/spec/unit/mutant/matcher/null_spec.rb +++ b/spec/unit/mutant/matcher/null_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Matcher::Null, '#call' do let(:object) { described_class.new } let(:env) { instance_double(Mutant::Env) } diff --git a/spec/unit/mutant/matcher/scope_spec.rb b/spec/unit/mutant/matcher/scope_spec.rb index d6eaaec7..37dde2a9 100644 --- a/spec/unit/mutant/matcher/scope_spec.rb +++ b/spec/unit/mutant/matcher/scope_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Matcher::Scope, '#call' do let(:scope) { TestApp } let(:object) { described_class.new(scope) } diff --git a/spec/unit/mutant/matcher/static_spec.rb b/spec/unit/mutant/matcher/static_spec.rb index 3a14f3e1..20a67149 100644 --- a/spec/unit/mutant/matcher/static_spec.rb +++ b/spec/unit/mutant/matcher/static_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Matcher::Static, '#call' do let(:object) { described_class.new(subjects) } let(:env) { instance_double(Mutant::Env) } diff --git a/spec/unit/mutant/meta/example/dsl_spec.rb b/spec/unit/mutant/meta/example/dsl_spec.rb index d474ea58..6e8d3daa 100644 --- a/spec/unit/mutant/meta/example/dsl_spec.rb +++ b/spec/unit/mutant/meta/example/dsl_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Meta::Example::DSL do describe '.call' do subject { described_class.call(file, type, block) } diff --git a/spec/unit/mutant/meta/example/verification_spec.rb b/spec/unit/mutant/meta/example/verification_spec.rb index 99397bd7..ea3e9410 100644 --- a/spec/unit/mutant/meta/example/verification_spec.rb +++ b/spec/unit/mutant/meta/example/verification_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Meta::Example::Verification do let(:object) { described_class.new(example, mutations) } diff --git a/spec/unit/mutant/meta/example_spec.rb b/spec/unit/mutant/meta/example_spec.rb index 5036dd90..4179d868 100644 --- a/spec/unit/mutant/meta/example_spec.rb +++ b/spec/unit/mutant/meta/example_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Meta::Example do let(:object) do described_class.new( diff --git a/spec/unit/mutant/mutation_spec.rb b/spec/unit/mutant/mutation_spec.rb index 2f63985c..ccbc7231 100644 --- a/spec/unit/mutant/mutation_spec.rb +++ b/spec/unit/mutant/mutation_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Mutation do let(:mutation_class) do Class.new(Mutant::Mutation) do diff --git a/spec/unit/mutant/mutator/node_spec.rb b/spec/unit/mutant/mutator/node_spec.rb index cc6326f8..cb569185 100644 --- a/spec/unit/mutant/mutator/node_spec.rb +++ b/spec/unit/mutant/mutator/node_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Mutant::Meta::Example::ALL.each.group_by(&:node_type).each do |type, examples| RSpec.describe Mutant::Mutator::REGISTRY.lookup(type) do toplevel_nodes = examples.map { |example| example.node.type }.uniq diff --git a/spec/unit/mutant/mutator_spec.rb b/spec/unit/mutant/mutator_spec.rb index 262455d8..d4063421 100644 --- a/spec/unit/mutant/mutator_spec.rb +++ b/spec/unit/mutant/mutator_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Mutator do describe '.handle' do subject do diff --git a/spec/unit/mutant/parallel/driver_spec.rb b/spec/unit/mutant/parallel/driver_spec.rb index 349e8000..2cefb30a 100644 --- a/spec/unit/mutant/parallel/driver_spec.rb +++ b/spec/unit/mutant/parallel/driver_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Parallel::Driver do let(:object) { described_class.new(binding) } diff --git a/spec/unit/mutant/parallel/master_spec.rb b/spec/unit/mutant/parallel/master_spec.rb index d63b1338..1610186d 100644 --- a/spec/unit/mutant/parallel/master_spec.rb +++ b/spec/unit/mutant/parallel/master_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Parallel::Master do let(:message_sequence) { FakeActor::MessageSequence.new } let(:actor_names) { %i[master worker_a worker_b] } diff --git a/spec/unit/mutant/parallel/source/array_spec.rb b/spec/unit/mutant/parallel/source/array_spec.rb index 902c6e9a..2817473c 100644 --- a/spec/unit/mutant/parallel/source/array_spec.rb +++ b/spec/unit/mutant/parallel/source/array_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Parallel::Source::Array do let(:object) { described_class.new(jobs) } diff --git a/spec/unit/mutant/parallel/worker_spec.rb b/spec/unit/mutant/parallel/worker_spec.rb index 6ecbf942..a1f4351a 100644 --- a/spec/unit/mutant/parallel/worker_spec.rb +++ b/spec/unit/mutant/parallel/worker_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Parallel::Worker do let(:actor_env) do FakeActor::Env.new(message_sequence, actor_names) diff --git a/spec/unit/mutant/parallel_spec.rb b/spec/unit/mutant/parallel_spec.rb index b0fe11ea..50744112 100644 --- a/spec/unit/mutant/parallel_spec.rb +++ b/spec/unit/mutant/parallel_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Parallel do describe '.async' do subject { described_class.async(config) } diff --git a/spec/unit/mutant/parser_spec.rb b/spec/unit/mutant/parser_spec.rb index cf44191c..cc487a85 100644 --- a/spec/unit/mutant/parser_spec.rb +++ b/spec/unit/mutant/parser_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Parser do let(:object) { described_class.new } diff --git a/spec/unit/mutant/registry_spec.rb b/spec/unit/mutant/registry_spec.rb index 054527d8..ead6be5d 100644 --- a/spec/unit/mutant/registry_spec.rb +++ b/spec/unit/mutant/registry_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Registry do let(:lookup) { object.lookup(type) } let(:object) { described_class.new } diff --git a/spec/unit/mutant/reporter/cli/printer/config_spec.rb b/spec/unit/mutant/reporter/cli/printer/config_spec.rb index c7ffe231..f20e2453 100644 --- a/spec/unit/mutant/reporter/cli/printer/config_spec.rb +++ b/spec/unit/mutant/reporter/cli/printer/config_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Reporter::CLI::Printer::Config do setup_shared_context diff --git a/spec/unit/mutant/reporter/cli/printer/env_progress_spec.rb b/spec/unit/mutant/reporter/cli/printer/env_progress_spec.rb index f3d00f61..74e99051 100644 --- a/spec/unit/mutant/reporter/cli/printer/env_progress_spec.rb +++ b/spec/unit/mutant/reporter/cli/printer/env_progress_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Reporter::CLI::Printer::EnvProgress do setup_shared_context diff --git a/spec/unit/mutant/reporter/cli/printer/env_result_spec.rb b/spec/unit/mutant/reporter/cli/printer/env_result_spec.rb index 775c06e8..d95f269c 100644 --- a/spec/unit/mutant/reporter/cli/printer/env_result_spec.rb +++ b/spec/unit/mutant/reporter/cli/printer/env_result_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Reporter::CLI::Printer::EnvResult do setup_shared_context diff --git a/spec/unit/mutant/reporter/cli/printer/mutation_progress_result_spec.rb b/spec/unit/mutant/reporter/cli/printer/mutation_progress_result_spec.rb index a3773571..40049590 100644 --- a/spec/unit/mutant/reporter/cli/printer/mutation_progress_result_spec.rb +++ b/spec/unit/mutant/reporter/cli/printer/mutation_progress_result_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Reporter::CLI::Printer::MutationProgressResult do setup_shared_context diff --git a/spec/unit/mutant/reporter/cli/printer/mutation_result_spec.rb b/spec/unit/mutant/reporter/cli/printer/mutation_result_spec.rb index b8f808b6..809c37d0 100644 --- a/spec/unit/mutant/reporter/cli/printer/mutation_result_spec.rb +++ b/spec/unit/mutant/reporter/cli/printer/mutation_result_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Reporter::CLI::Printer::MutationResult do setup_shared_context diff --git a/spec/unit/mutant/reporter/cli/printer/status_progressive_spec.rb b/spec/unit/mutant/reporter/cli/printer/status_progressive_spec.rb index 90bb87cf..407cb2d0 100644 --- a/spec/unit/mutant/reporter/cli/printer/status_progressive_spec.rb +++ b/spec/unit/mutant/reporter/cli/printer/status_progressive_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Reporter::CLI::Printer::StatusProgressive do setup_shared_context diff --git a/spec/unit/mutant/reporter/cli/printer/status_spec.rb b/spec/unit/mutant/reporter/cli/printer/status_spec.rb index 69a8fd39..c76a623e 100644 --- a/spec/unit/mutant/reporter/cli/printer/status_spec.rb +++ b/spec/unit/mutant/reporter/cli/printer/status_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Reporter::CLI::Printer::Status do setup_shared_context diff --git a/spec/unit/mutant/reporter/cli/printer/subject_progress_spec.rb b/spec/unit/mutant/reporter/cli/printer/subject_progress_spec.rb index 38946446..b4fb3243 100644 --- a/spec/unit/mutant/reporter/cli/printer/subject_progress_spec.rb +++ b/spec/unit/mutant/reporter/cli/printer/subject_progress_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Reporter::CLI::Printer::SubjectProgress do setup_shared_context diff --git a/spec/unit/mutant/reporter/cli/printer/subject_result_spec.rb b/spec/unit/mutant/reporter/cli/printer/subject_result_spec.rb index a6ce289f..d43233e0 100644 --- a/spec/unit/mutant/reporter/cli/printer/subject_result_spec.rb +++ b/spec/unit/mutant/reporter/cli/printer/subject_result_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Reporter::CLI::Printer::SubjectResult do setup_shared_context diff --git a/spec/unit/mutant/reporter/cli/printer/test_result_spec.rb b/spec/unit/mutant/reporter/cli/printer/test_result_spec.rb index a0bbaa0e..91116908 100644 --- a/spec/unit/mutant/reporter/cli/printer/test_result_spec.rb +++ b/spec/unit/mutant/reporter/cli/printer/test_result_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Reporter::CLI::Printer::TestResult do setup_shared_context diff --git a/spec/unit/mutant/reporter/cli/printer_spec.rb b/spec/unit/mutant/reporter/cli/printer_spec.rb index 2232c7e6..0852b5ff 100644 --- a/spec/unit/mutant/reporter/cli/printer_spec.rb +++ b/spec/unit/mutant/reporter/cli/printer_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Reporter::CLI::Printer do let(:output) { StringIO.new } diff --git a/spec/unit/mutant/reporter/cli/tput_spec.rb b/spec/unit/mutant/reporter/cli/tput_spec.rb index e39044fe..cc3ddb02 100644 --- a/spec/unit/mutant/reporter/cli/tput_spec.rb +++ b/spec/unit/mutant/reporter/cli/tput_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Reporter::CLI::Tput do describe '.detect' do subject { described_class.detect } diff --git a/spec/unit/mutant/reporter/cli_spec.rb b/spec/unit/mutant/reporter/cli_spec.rb index 53c1153f..884c5ae6 100644 --- a/spec/unit/mutant/reporter/cli_spec.rb +++ b/spec/unit/mutant/reporter/cli_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Reporter::CLI do setup_shared_context diff --git a/spec/unit/mutant/reporter/null_spec.rb b/spec/unit/mutant/reporter/null_spec.rb index 43dcd155..0baed186 100644 --- a/spec/unit/mutant/reporter/null_spec.rb +++ b/spec/unit/mutant/reporter/null_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Reporter::Null do let(:object) { described_class.new } let(:value) { instance_double(Object) } diff --git a/spec/unit/mutant/reporter/sequence_spec.rb b/spec/unit/mutant/reporter/sequence_spec.rb index cc84a4dd..952d61a8 100644 --- a/spec/unit/mutant/reporter/sequence_spec.rb +++ b/spec/unit/mutant/reporter/sequence_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Reporter::Sequence do let(:object) { described_class.new([reporter_a, reporter_b]) } let(:value) { instance_double(Object) } diff --git a/spec/unit/mutant/repository/diff_spec.rb b/spec/unit/mutant/repository/diff_spec.rb index 2b460a20..6ba60965 100644 --- a/spec/unit/mutant/repository/diff_spec.rb +++ b/spec/unit/mutant/repository/diff_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + describe Mutant::Repository::Diff do describe '#touches?' do let(:object) do @@ -28,8 +29,8 @@ describe Mutant::Repository::Diff do subject { object.touches?(path, line_range) } shared_context 'test if git tracks the file' do - # rubocop:disable Lint/UnneededSplatExpansion before do + # rubocop:disable Lint/UnneededSplatExpansion expect(config.kernel).to receive(:system) .ordered .with( diff --git a/spec/unit/mutant/repository/subject_filter_spec.rb b/spec/unit/mutant/repository/subject_filter_spec.rb index 4c5b2e69..797911cb 100644 --- a/spec/unit/mutant/repository/subject_filter_spec.rb +++ b/spec/unit/mutant/repository/subject_filter_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Repository::SubjectFilter do context '#call' do subject { object.call(mutant_subject) } diff --git a/spec/unit/mutant/require_highjack_spec.rb b/spec/unit/mutant/require_highjack_spec.rb index 356aac42..14ec88a3 100644 --- a/spec/unit/mutant/require_highjack_spec.rb +++ b/spec/unit/mutant/require_highjack_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::RequireHighjack do let(:highjacked_calls) { [] } let(:require_calls) { [] } diff --git a/spec/unit/mutant/result/class_methods_spec.rb b/spec/unit/mutant/result/class_methods_spec.rb index be6e6f87..e3b5645a 100644 --- a/spec/unit/mutant/result/class_methods_spec.rb +++ b/spec/unit/mutant/result/class_methods_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + # The effect of this private module is done at boot time. # Hence there is no way to kill the mutations at runtime # so we have to directly hook into the private moduel via diff --git a/spec/unit/mutant/result/env_spec.rb b/spec/unit/mutant/result/env_spec.rb index cb1b71fb..75cc994f 100644 --- a/spec/unit/mutant/result/env_spec.rb +++ b/spec/unit/mutant/result/env_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Result::Env do let(:object) do described_class.new( diff --git a/spec/unit/mutant/result/mutation_spec.rb b/spec/unit/mutant/result/mutation_spec.rb index 2c1c4625..ca64857e 100644 --- a/spec/unit/mutant/result/mutation_spec.rb +++ b/spec/unit/mutant/result/mutation_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Result::Mutation do let(:object) do described_class.new( diff --git a/spec/unit/mutant/result/subject_spec.rb b/spec/unit/mutant/result/subject_spec.rb index 2c3b9035..b05d13f1 100644 --- a/spec/unit/mutant/result/subject_spec.rb +++ b/spec/unit/mutant/result/subject_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Result::Subject do let(:object) do described_class.new( diff --git a/spec/unit/mutant/result_spec.rb b/spec/unit/mutant/result_spec.rb index e79546d0..5f5a5d03 100644 --- a/spec/unit/mutant/result_spec.rb +++ b/spec/unit/mutant/result_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Result do let(:object) do Class.new do diff --git a/spec/unit/mutant/runner/sink_spec.rb b/spec/unit/mutant/runner/sink_spec.rb index a144e72a..b834ac4d 100644 --- a/spec/unit/mutant/runner/sink_spec.rb +++ b/spec/unit/mutant/runner/sink_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + describe Mutant::Runner::Sink do setup_shared_context diff --git a/spec/unit/mutant/runner_spec.rb b/spec/unit/mutant/runner_spec.rb index 53932952..5a376476 100644 --- a/spec/unit/mutant/runner_spec.rb +++ b/spec/unit/mutant/runner_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Runner do describe '.call' do let(:reporter) { instance_double(Mutant::Reporter, delay: delay) } diff --git a/spec/unit/mutant/selector/expression_spec.rb b/spec/unit/mutant/selector/expression_spec.rb index 06cd3f30..5f5b0e3a 100644 --- a/spec/unit/mutant/selector/expression_spec.rb +++ b/spec/unit/mutant/selector/expression_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Selector::Expression do describe '#call' do let(:object) { described_class.new(integration) } diff --git a/spec/unit/mutant/subject/method/instance_spec.rb b/spec/unit/mutant/subject/method/instance_spec.rb index 68f4739b..0457a98e 100644 --- a/spec/unit/mutant/subject/method/instance_spec.rb +++ b/spec/unit/mutant/subject/method/instance_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Subject::Method::Instance do let(:object) { described_class.new(context, node) } diff --git a/spec/unit/mutant/subject/method/singleton_spec.rb b/spec/unit/mutant/subject/method/singleton_spec.rb index 88861338..ec2b8080 100644 --- a/spec/unit/mutant/subject/method/singleton_spec.rb +++ b/spec/unit/mutant/subject/method/singleton_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Subject::Method::Singleton do let(:object) { described_class.new(context, node) } diff --git a/spec/unit/mutant/subject_spec.rb b/spec/unit/mutant/subject_spec.rb index a4830c37..3e4d1299 100644 --- a/spec/unit/mutant/subject_spec.rb +++ b/spec/unit/mutant/subject_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Subject do let(:class_under_test) do Class.new(described_class) do diff --git a/spec/unit/mutant/util/one_spec.rb b/spec/unit/mutant/util/one_spec.rb index a3907708..ccba715f 100644 --- a/spec/unit/mutant/util/one_spec.rb +++ b/spec/unit/mutant/util/one_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Util, '.one' do let(:first) { instance_double(Object) } let(:array) { instance_double(Array, one?: true, first: first) } diff --git a/spec/unit/mutant/warning_filter_spec.rb b/spec/unit/mutant/warning_filter_spec.rb index d6b78f75..e6155962 100644 --- a/spec/unit/mutant/warning_filter_spec.rb +++ b/spec/unit/mutant/warning_filter_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::WarningFilter do before do if RUBY_ENGINE.eql?('rbx') @@ -70,7 +71,7 @@ RSpec.describe Mutant::WarningFilter do it 'returns warnings generated within block' do warnings = object.use do - # rubocop:disable Lint/Eval + # rubocop:disable Style/EvalWithLocation eval(<<-RUBY) Class.new do def foo diff --git a/spec/unit/mutant/zombifier_spec.rb b/spec/unit/mutant/zombifier_spec.rb index 1d623778..8ab3f4e1 100644 --- a/spec/unit/mutant/zombifier_spec.rb +++ b/spec/unit/mutant/zombifier_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant::Zombifier do let(:root_require) { Pathname.new('project') } let(:pathname) { class_double(Pathname) } diff --git a/spec/unit/mutant_spec.rb b/spec/unit/mutant_spec.rb index 1a1046ea..7167ec95 100644 --- a/spec/unit/mutant_spec.rb +++ b/spec/unit/mutant_spec.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + RSpec.describe Mutant do let(:object) { described_class }