mutant 0.8.16 → 0.8.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +1 -1
- data/Changelog.md +6 -0
- data/Gemfile +3 -1
- data/Gemfile.lock +66 -62
- data/Rakefile +2 -0
- data/bin/mutant +1 -0
- data/config/flay.yml +1 -1
- data/config/reek.yml +136 -136
- data/config/rubocop.yml +23 -1
- data/lib/mutant.rb +2 -0
- data/lib/mutant/actor.rb +2 -0
- data/lib/mutant/actor/env.rb +2 -0
- data/lib/mutant/actor/mailbox.rb +2 -0
- data/lib/mutant/actor/receiver.rb +2 -0
- data/lib/mutant/actor/sender.rb +2 -0
- data/lib/mutant/ast.rb +2 -0
- data/lib/mutant/ast/meta.rb +2 -0
- data/lib/mutant/ast/meta/const.rb +2 -0
- data/lib/mutant/ast/meta/optarg.rb +2 -0
- data/lib/mutant/ast/meta/resbody.rb +2 -0
- data/lib/mutant/ast/meta/restarg.rb +2 -0
- data/lib/mutant/ast/meta/send.rb +2 -0
- data/lib/mutant/ast/meta/symbol.rb +2 -0
- data/lib/mutant/ast/named_children.rb +2 -0
- data/lib/mutant/ast/node_predicates.rb +2 -0
- data/lib/mutant/ast/nodes.rb +2 -0
- data/lib/mutant/ast/regexp.rb +2 -0
- data/lib/mutant/ast/regexp/transformer.rb +2 -0
- data/lib/mutant/ast/regexp/transformer/alternative.rb +2 -0
- data/lib/mutant/ast/regexp/transformer/character_set.rb +2 -0
- data/lib/mutant/ast/regexp/transformer/direct.rb +2 -0
- data/lib/mutant/ast/regexp/transformer/options_group.rb +2 -0
- data/lib/mutant/ast/regexp/transformer/quantifier.rb +3 -1
- data/lib/mutant/ast/regexp/transformer/recursive.rb +2 -0
- data/lib/mutant/ast/regexp/transformer/root.rb +2 -0
- data/lib/mutant/ast/regexp/transformer/text.rb +2 -0
- data/lib/mutant/ast/sexp.rb +2 -0
- data/lib/mutant/ast/types.rb +2 -0
- data/lib/mutant/cli.rb +2 -0
- data/lib/mutant/color.rb +3 -1
- data/lib/mutant/config.rb +2 -0
- data/lib/mutant/context.rb +2 -0
- data/lib/mutant/diff.rb +4 -2
- data/lib/mutant/env.rb +2 -0
- data/lib/mutant/env/bootstrap.rb +2 -0
- data/lib/mutant/expression.rb +2 -0
- data/lib/mutant/expression/method.rb +2 -0
- data/lib/mutant/expression/methods.rb +2 -0
- data/lib/mutant/expression/namespace.rb +2 -0
- data/lib/mutant/expression/parser.rb +2 -0
- data/lib/mutant/integration.rb +2 -0
- data/lib/mutant/isolation.rb +2 -0
- data/lib/mutant/isolation/fork.rb +2 -0
- data/lib/mutant/isolation/none.rb +2 -0
- data/lib/mutant/loader.rb +2 -0
- data/lib/mutant/matcher.rb +2 -0
- data/lib/mutant/matcher/chain.rb +2 -0
- data/lib/mutant/matcher/compiler.rb +2 -0
- data/lib/mutant/matcher/config.rb +2 -0
- data/lib/mutant/matcher/filter.rb +2 -0
- data/lib/mutant/matcher/method.rb +2 -0
- data/lib/mutant/matcher/method/instance.rb +2 -0
- data/lib/mutant/matcher/method/singleton.rb +2 -0
- data/lib/mutant/matcher/methods.rb +2 -0
- data/lib/mutant/matcher/namespace.rb +2 -0
- data/lib/mutant/matcher/null.rb +2 -0
- data/lib/mutant/matcher/scope.rb +2 -0
- data/lib/mutant/matcher/static.rb +2 -0
- data/lib/mutant/meta.rb +4 -0
- data/lib/mutant/meta/example.rb +2 -0
- data/lib/mutant/meta/example/dsl.rb +2 -0
- data/lib/mutant/meta/example/verification.rb +2 -0
- data/lib/mutant/mutation.rb +2 -0
- data/lib/mutant/mutator.rb +2 -0
- data/lib/mutant/mutator/node.rb +4 -2
- data/lib/mutant/mutator/node/and_asgn.rb +2 -0
- data/lib/mutant/mutator/node/argument.rb +2 -0
- data/lib/mutant/mutator/node/arguments.rb +2 -0
- data/lib/mutant/mutator/node/begin.rb +2 -0
- data/lib/mutant/mutator/node/binary.rb +2 -0
- data/lib/mutant/mutator/node/block.rb +2 -0
- data/lib/mutant/mutator/node/break.rb +2 -0
- data/lib/mutant/mutator/node/case.rb +2 -0
- data/lib/mutant/mutator/node/class.rb +2 -0
- data/lib/mutant/mutator/node/conditional_loop.rb +2 -0
- data/lib/mutant/mutator/node/const.rb +2 -0
- data/lib/mutant/mutator/node/define.rb +2 -0
- data/lib/mutant/mutator/node/defined.rb +2 -0
- data/lib/mutant/mutator/node/dstr.rb +2 -0
- data/lib/mutant/mutator/node/dsym.rb +2 -0
- data/lib/mutant/mutator/node/generic.rb +2 -0
- data/lib/mutant/mutator/node/if.rb +2 -0
- data/lib/mutant/mutator/node/kwbegin.rb +2 -0
- data/lib/mutant/mutator/node/literal.rb +2 -0
- data/lib/mutant/mutator/node/literal/array.rb +2 -0
- data/lib/mutant/mutator/node/literal/boolean.rb +2 -0
- data/lib/mutant/mutator/node/literal/float.rb +2 -0
- data/lib/mutant/mutator/node/literal/hash.rb +2 -0
- data/lib/mutant/mutator/node/literal/integer.rb +2 -0
- data/lib/mutant/mutator/node/literal/nil.rb +2 -0
- data/lib/mutant/mutator/node/literal/range.rb +2 -0
- data/lib/mutant/mutator/node/literal/regex.rb +2 -0
- data/lib/mutant/mutator/node/literal/string.rb +2 -0
- data/lib/mutant/mutator/node/literal/symbol.rb +2 -0
- data/lib/mutant/mutator/node/masgn.rb +2 -0
- data/lib/mutant/mutator/node/match_current_line.rb +2 -0
- data/lib/mutant/mutator/node/mlhs.rb +2 -0
- data/lib/mutant/mutator/node/named_value/access.rb +2 -0
- data/lib/mutant/mutator/node/named_value/constant_assignment.rb +2 -0
- data/lib/mutant/mutator/node/named_value/variable_assignment.rb +2 -0
- data/lib/mutant/mutator/node/next.rb +2 -0
- data/lib/mutant/mutator/node/noop.rb +3 -1
- data/lib/mutant/mutator/node/nthref.rb +2 -0
- data/lib/mutant/mutator/node/op_asgn.rb +2 -0
- data/lib/mutant/mutator/node/or_asgn.rb +2 -0
- data/lib/mutant/mutator/node/regexp.rb +2 -0
- data/lib/mutant/mutator/node/regexp/alternation_meta.rb +2 -0
- data/lib/mutant/mutator/node/regexp/capture_group.rb +2 -0
- data/lib/mutant/mutator/node/regexp/character_type.rb +2 -0
- data/lib/mutant/mutator/node/regexp/end_of_line_anchor.rb +2 -0
- data/lib/mutant/mutator/node/regexp/end_of_string_or_before_end_of_line_anchor.rb +2 -0
- data/lib/mutant/mutator/node/regexp/greedy_zero_or_more.rb +2 -0
- data/lib/mutant/mutator/node/regopt.rb +2 -0
- data/lib/mutant/mutator/node/resbody.rb +2 -0
- data/lib/mutant/mutator/node/rescue.rb +2 -0
- data/lib/mutant/mutator/node/return.rb +2 -0
- data/lib/mutant/mutator/node/send.rb +2 -0
- data/lib/mutant/mutator/node/send/attribute_assignment.rb +2 -0
- data/lib/mutant/mutator/node/send/binary.rb +2 -0
- data/lib/mutant/mutator/node/send/conditional.rb +2 -0
- data/lib/mutant/mutator/node/send/index.rb +2 -0
- data/lib/mutant/mutator/node/splat.rb +2 -0
- data/lib/mutant/mutator/node/super.rb +2 -0
- data/lib/mutant/mutator/node/when.rb +2 -0
- data/lib/mutant/mutator/node/yield.rb +2 -0
- data/lib/mutant/mutator/node/zsuper.rb +2 -0
- data/lib/mutant/mutator/util.rb +2 -0
- data/lib/mutant/mutator/util/array.rb +2 -0
- data/lib/mutant/mutator/util/symbol.rb +2 -0
- data/lib/mutant/parallel.rb +2 -0
- data/lib/mutant/parallel/master.rb +2 -0
- data/lib/mutant/parallel/source.rb +2 -0
- data/lib/mutant/parallel/worker.rb +2 -0
- data/lib/mutant/parser.rb +2 -0
- data/lib/mutant/registry.rb +2 -0
- data/lib/mutant/reporter.rb +2 -0
- data/lib/mutant/reporter/cli.rb +2 -0
- data/lib/mutant/reporter/cli/format.rb +2 -0
- data/lib/mutant/reporter/cli/printer.rb +2 -0
- data/lib/mutant/reporter/cli/printer/config.rb +2 -0
- data/lib/mutant/reporter/cli/printer/env_progress.rb +2 -1
- data/lib/mutant/reporter/cli/printer/env_result.rb +2 -0
- data/lib/mutant/reporter/cli/printer/mutation_progress_result.rb +2 -0
- data/lib/mutant/reporter/cli/printer/mutation_result.rb +2 -0
- data/lib/mutant/reporter/cli/printer/status.rb +2 -0
- data/lib/mutant/reporter/cli/printer/status_progressive.rb +2 -0
- data/lib/mutant/reporter/cli/printer/subject_progress.rb +2 -0
- data/lib/mutant/reporter/cli/printer/subject_result.rb +2 -0
- data/lib/mutant/reporter/cli/printer/test_result.rb +2 -0
- data/lib/mutant/reporter/cli/tput.rb +2 -0
- data/lib/mutant/reporter/null.rb +2 -0
- data/lib/mutant/reporter/sequence.rb +2 -0
- data/lib/mutant/repository.rb +2 -0
- data/lib/mutant/require_highjack.rb +2 -0
- data/lib/mutant/result.rb +2 -0
- data/lib/mutant/runner.rb +2 -0
- data/lib/mutant/runner/sink.rb +2 -0
- data/lib/mutant/scope.rb +2 -0
- data/lib/mutant/selector.rb +2 -0
- data/lib/mutant/selector/expression.rb +2 -0
- data/lib/mutant/subject.rb +2 -0
- data/lib/mutant/subject/method.rb +2 -0
- data/lib/mutant/subject/method/instance.rb +2 -0
- data/lib/mutant/subject/method/singleton.rb +2 -0
- data/lib/mutant/test.rb +2 -0
- data/lib/mutant/util.rb +2 -0
- data/lib/mutant/version.rb +3 -1
- data/lib/mutant/warning_filter.rb +2 -0
- data/lib/mutant/zombifier.rb +2 -0
- data/meta/and.rb +2 -0
- data/meta/and_asgn.rb +2 -0
- data/meta/array.rb +2 -0
- data/meta/begin.rb +2 -0
- data/meta/block.rb +2 -0
- data/meta/block_pass.rb +2 -0
- data/meta/blockarg.rb +2 -0
- data/meta/break.rb +2 -0
- data/meta/case.rb +2 -0
- data/meta/casgn.rb +2 -0
- data/meta/cbase.rb +2 -0
- data/meta/class.rb +2 -0
- data/meta/const.rb +2 -0
- data/meta/csend.rb +2 -0
- data/meta/cvar.rb +2 -0
- data/meta/cvasgn.rb +2 -0
- data/meta/date.rb +2 -0
- data/meta/def.rb +2 -0
- data/meta/defined.rb +2 -0
- data/meta/dstr.rb +2 -0
- data/meta/dsym.rb +2 -0
- data/meta/ensure.rb +2 -0
- data/meta/false.rb +2 -0
- data/meta/float.rb +2 -0
- data/meta/gvar.rb +2 -0
- data/meta/gvasgn.rb +2 -0
- data/meta/hash.rb +2 -0
- data/meta/if.rb +2 -0
- data/meta/int.rb +2 -0
- data/meta/ivar.rb +2 -0
- data/meta/ivasgn.rb +2 -0
- data/meta/kwarg.rb +2 -0
- data/meta/kwbegin.rb +2 -0
- data/meta/kwoptarg.rb +2 -0
- data/meta/lvar.rb +2 -0
- data/meta/lvasgn.rb +2 -0
- data/meta/masgn.rb +2 -0
- data/meta/match_current_line.rb +2 -0
- data/meta/next.rb +2 -0
- data/meta/nil.rb +2 -0
- data/meta/nthref.rb +2 -0
- data/meta/op_assgn.rb +2 -0
- data/meta/or.rb +2 -0
- data/meta/or_asgn.rb +2 -0
- data/meta/range.rb +2 -0
- data/meta/redo.rb +2 -0
- data/meta/regexp.rb +2 -0
- data/meta/regexp/character_types.rb +2 -0
- data/meta/regexp/regexp_alternation_meta.rb +2 -0
- data/meta/regexp/regexp_bol_anchor.rb +2 -0
- data/meta/regexp/regexp_bos_anchor.rb +2 -0
- data/meta/regexp/regexp_capture_group.rb +2 -0
- data/meta/regexp/regexp_eol_anchor.rb +2 -0
- data/meta/regexp/regexp_eos_anchor.rb +2 -0
- data/meta/regexp/regexp_eos_ob_eol_anchor.rb +2 -0
- data/meta/regexp/regexp_greedy_zero_or_more.rb +2 -0
- data/meta/regexp/regexp_root_expression.rb +2 -0
- data/meta/regopt.rb +2 -0
- data/meta/rescue.rb +2 -0
- data/meta/restarg.rb +2 -0
- data/meta/return.rb +2 -0
- data/meta/self.rb +2 -0
- data/meta/send.rb +2 -0
- data/meta/str.rb +2 -0
- data/meta/super.rb +2 -0
- data/meta/sym.rb +2 -0
- data/meta/true.rb +2 -0
- data/meta/until.rb +2 -0
- data/meta/while.rb +2 -0
- data/meta/yield.rb +2 -0
- data/mutant-rspec.gemspec +3 -1
- data/mutant.gemspec +15 -13
- data/spec/integration/mutant/corpus_spec.rb +2 -0
- data/spec/integration/mutant/isolation/fork_spec.rb +3 -0
- data/spec/integration/mutant/null_spec.rb +2 -0
- data/spec/integration/mutant/rspec_spec.rb +2 -0
- data/spec/integration/mutant/test_mutator_handles_types_spec.rb +2 -0
- data/spec/shared/framework_integration_behavior.rb +2 -0
- data/spec/shared/method_matcher_behavior.rb +2 -0
- data/spec/spec_helper.rb +2 -1
- data/spec/support/corpus.rb +2 -0
- data/spec/support/fake_actor.rb +3 -1
- data/spec/support/file_system.rb +2 -0
- data/spec/support/ice_nine_config.rb +2 -0
- data/spec/support/rb_bug.rb +2 -0
- data/spec/support/ruby_vm.rb +3 -0
- data/spec/support/shared_context.rb +3 -1
- data/spec/support/test_app.rb +3 -1
- data/spec/support/warning.rb +2 -0
- data/spec/support/warnings.yml +1 -1
- data/spec/support/xspec.rb +4 -2
- data/spec/unit/mutant/actor/binding_spec.rb +2 -0
- data/spec/unit/mutant/actor/env_spec.rb +2 -0
- data/spec/unit/mutant/actor/mailbox_spec.rb +2 -0
- data/spec/unit/mutant/actor/message_spec.rb +2 -0
- data/spec/unit/mutant/actor/receiver_spec.rb +2 -0
- data/spec/unit/mutant/actor/sender_spec.rb +2 -0
- data/spec/unit/mutant/ast/meta/optarg_spec.rb +2 -0
- data/spec/unit/mutant/ast/meta/send/proc_predicate_spec.rb +2 -0
- data/spec/unit/mutant/ast/meta/send/receiver_possible_top_level_const_predicate_spec.rb +2 -0
- data/spec/unit/mutant/ast/meta/send_spec.rb +2 -0
- data/spec/unit/mutant/ast/named_children_spec.rb +2 -0
- data/spec/unit/mutant/ast/regexp/parse_spec.rb +2 -0
- data/spec/unit/mutant/ast/regexp/supported_predicate_spec.rb +2 -0
- data/spec/unit/mutant/ast/regexp/transformer/lookup_table/table_spec.rb +2 -0
- data/spec/unit/mutant/ast/regexp/transformer/lookup_table_spec.rb +2 -0
- data/spec/unit/mutant/ast/regexp/transformer_spec.rb +2 -0
- data/spec/unit/mutant/ast/regexp_spec.rb +2 -0
- data/spec/unit/mutant/ast/sexp_spec.rb +2 -0
- data/spec/unit/mutant/ast_spec.rb +2 -0
- data/spec/unit/mutant/cli_spec.rb +17 -15
- data/spec/unit/mutant/context_spec.rb +2 -0
- data/spec/unit/mutant/diff_spec.rb +8 -6
- data/spec/unit/mutant/env/bootstrap_spec.rb +2 -0
- data/spec/unit/mutant/env_spec.rb +2 -0
- data/spec/unit/mutant/expression/method_spec.rb +2 -0
- data/spec/unit/mutant/expression/methods_spec.rb +2 -0
- data/spec/unit/mutant/expression/namespace/exact_spec.rb +2 -0
- data/spec/unit/mutant/expression/namespace/recursive_spec.rb +2 -0
- data/spec/unit/mutant/expression/parser_spec.rb +2 -0
- data/spec/unit/mutant/expression_spec.rb +2 -0
- data/spec/unit/mutant/integration/rspec_spec.rb +2 -0
- data/spec/unit/mutant/integration_spec.rb +2 -0
- data/spec/unit/mutant/isolation/fork_spec.rb +2 -0
- data/spec/unit/mutant/isolation/none_spec.rb +2 -0
- data/spec/unit/mutant/loader_spec.rb +2 -0
- data/spec/unit/mutant/matcher/chain_spec.rb +2 -0
- data/spec/unit/mutant/matcher/compiler/subject_prefix_spec.rb +2 -0
- data/spec/unit/mutant/matcher/compiler_spec.rb +2 -0
- data/spec/unit/mutant/matcher/config_spec.rb +2 -0
- data/spec/unit/mutant/matcher/filter_spec.rb +2 -0
- data/spec/unit/mutant/matcher/method/instance_spec.rb +2 -0
- data/spec/unit/mutant/matcher/method/singleton_spec.rb +2 -0
- data/spec/unit/mutant/matcher/methods/instance_spec.rb +2 -0
- data/spec/unit/mutant/matcher/methods/singleton_spec.rb +2 -0
- data/spec/unit/mutant/matcher/namespace_spec.rb +2 -0
- data/spec/unit/mutant/matcher/null_spec.rb +2 -0
- data/spec/unit/mutant/matcher/scope_spec.rb +2 -0
- data/spec/unit/mutant/matcher/static_spec.rb +2 -0
- data/spec/unit/mutant/meta/example/dsl_spec.rb +2 -0
- data/spec/unit/mutant/meta/example/verification_spec.rb +5 -3
- data/spec/unit/mutant/meta/example_spec.rb +2 -0
- data/spec/unit/mutant/mutation_spec.rb +2 -0
- data/spec/unit/mutant/mutator/node_spec.rb +2 -0
- data/spec/unit/mutant/mutator_spec.rb +2 -0
- data/spec/unit/mutant/parallel/driver_spec.rb +2 -0
- data/spec/unit/mutant/parallel/master_spec.rb +2 -0
- data/spec/unit/mutant/parallel/source/array_spec.rb +2 -0
- data/spec/unit/mutant/parallel/worker_spec.rb +2 -0
- data/spec/unit/mutant/parallel_spec.rb +2 -0
- data/spec/unit/mutant/parser_spec.rb +2 -0
- data/spec/unit/mutant/registry_spec.rb +2 -0
- data/spec/unit/mutant/reporter/cli/printer/config_spec.rb +4 -2
- data/spec/unit/mutant/reporter/cli/printer/env_progress_spec.rb +5 -3
- data/spec/unit/mutant/reporter/cli/printer/env_result_spec.rb +3 -1
- data/spec/unit/mutant/reporter/cli/printer/mutation_progress_result_spec.rb +2 -0
- data/spec/unit/mutant/reporter/cli/printer/mutation_result_spec.rb +6 -4
- data/spec/unit/mutant/reporter/cli/printer/status_progressive_spec.rb +6 -4
- data/spec/unit/mutant/reporter/cli/printer/status_spec.rb +6 -4
- data/spec/unit/mutant/reporter/cli/printer/subject_progress_spec.rb +5 -3
- data/spec/unit/mutant/reporter/cli/printer/subject_result_spec.rb +5 -3
- data/spec/unit/mutant/reporter/cli/printer/test_result_spec.rb +3 -1
- data/spec/unit/mutant/reporter/cli/printer_spec.rb +6 -4
- data/spec/unit/mutant/reporter/cli/tput_spec.rb +2 -0
- data/spec/unit/mutant/reporter/cli_spec.rb +7 -5
- data/spec/unit/mutant/reporter/null_spec.rb +2 -0
- data/spec/unit/mutant/reporter/sequence_spec.rb +2 -0
- data/spec/unit/mutant/repository/diff_spec.rb +3 -1
- data/spec/unit/mutant/repository/subject_filter_spec.rb +2 -0
- data/spec/unit/mutant/require_highjack_spec.rb +2 -0
- data/spec/unit/mutant/result/class_methods_spec.rb +2 -0
- data/spec/unit/mutant/result/env_spec.rb +2 -0
- data/spec/unit/mutant/result/mutation_spec.rb +2 -0
- data/spec/unit/mutant/result/subject_spec.rb +2 -0
- data/spec/unit/mutant/result_spec.rb +2 -0
- data/spec/unit/mutant/runner/sink_spec.rb +2 -0
- data/spec/unit/mutant/runner_spec.rb +2 -0
- data/spec/unit/mutant/selector/expression_spec.rb +2 -0
- data/spec/unit/mutant/subject/method/instance_spec.rb +2 -0
- data/spec/unit/mutant/subject/method/singleton_spec.rb +2 -0
- data/spec/unit/mutant/subject_spec.rb +2 -0
- data/spec/unit/mutant/util/one_spec.rb +2 -0
- data/spec/unit/mutant/warning_filter_spec.rb +3 -1
- data/spec/unit/mutant/zombifier_spec.rb +2 -0
- data/spec/unit/mutant_spec.rb +2 -0
- metadata +57 -64
- data/spec/support/compress_helper.rb +0 -9
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
RSpec.describe Mutant::Reporter::CLI::Printer::EnvProgress do
|
2
4
|
setup_shared_context
|
3
5
|
|
@@ -7,7 +9,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::EnvProgress do
|
|
7
9
|
context 'without progress' do
|
8
10
|
with(:subject_a_result) { { mutation_results: [] } }
|
9
11
|
|
10
|
-
it_reports
|
12
|
+
it_reports <<~'STR'
|
11
13
|
Mutant configuration:
|
12
14
|
Matcher: #<Mutant::Matcher::Config empty>
|
13
15
|
Integration: Mutant::Integration::Null
|
@@ -28,7 +30,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::EnvProgress do
|
|
28
30
|
end
|
29
31
|
|
30
32
|
context 'on full coverage' do
|
31
|
-
it_reports
|
33
|
+
it_reports <<~'STR'
|
32
34
|
Mutant configuration:
|
33
35
|
Matcher: #<Mutant::Matcher::Config empty>
|
34
36
|
Integration: Mutant::Integration::Null
|
@@ -51,7 +53,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::EnvProgress do
|
|
51
53
|
context 'on partial coverage' do
|
52
54
|
with(:mutation_a_test_result) { { passed: true } }
|
53
55
|
|
54
|
-
it_reports
|
56
|
+
it_reports <<~'STR'
|
55
57
|
Mutant configuration:
|
56
58
|
Matcher: #<Mutant::Matcher::Config empty>
|
57
59
|
Integration: Mutant::Integration::Null
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
RSpec.describe Mutant::Reporter::CLI::Printer::EnvResult do
|
2
4
|
setup_shared_context
|
3
5
|
|
@@ -6,7 +8,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::EnvResult do
|
|
6
8
|
let(:reportable) { env_result }
|
7
9
|
|
8
10
|
describe '.call' do
|
9
|
-
it_reports
|
11
|
+
it_reports <<~'STR'
|
10
12
|
subject-a
|
11
13
|
- test-a
|
12
14
|
evil:subject-a:d27d2
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
RSpec.describe Mutant::Reporter::CLI::Printer::MutationResult do
|
2
4
|
setup_shared_context
|
3
5
|
|
@@ -26,7 +28,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::MutationResult do
|
|
26
28
|
end
|
27
29
|
|
28
30
|
context 'on non tty' do
|
29
|
-
it_reports(
|
31
|
+
it_reports(<<~'STR')
|
30
32
|
evil:subject-a:d27d2
|
31
33
|
@@ -1,2 +1,2 @@
|
32
34
|
-true
|
@@ -43,7 +45,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::MutationResult do
|
|
43
45
|
# Unparses exactly the same way as above node
|
44
46
|
let(:mutation_a_node) { s(:zsuper) }
|
45
47
|
|
46
|
-
it_reports(
|
48
|
+
it_reports(<<~REPORT)
|
47
49
|
evil:subject-a:a5bc7
|
48
50
|
--- Internal failure ---
|
49
51
|
BUG: Mutation NOT resulted in exactly one diff hunk. Please report a reproduction!
|
@@ -67,7 +69,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::MutationResult do
|
|
67
69
|
Mutant::Mutation::Neutral.new(subject_a, s(:true))
|
68
70
|
end
|
69
71
|
|
70
|
-
it_reports(
|
72
|
+
it_reports(<<~REPORT)
|
71
73
|
neutral:subject-a:d5318
|
72
74
|
--- Neutral failure ---
|
73
75
|
Original code was inserted unmutated. And the test did NOT PASS.
|
@@ -92,7 +94,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::MutationResult do
|
|
92
94
|
Mutant::Mutation::Noop.new(subject_a, s(:true))
|
93
95
|
end
|
94
96
|
|
95
|
-
it_reports(
|
97
|
+
it_reports(<<~REPORT)
|
96
98
|
noop:subject-a:d5318
|
97
99
|
---- Noop failure -----
|
98
100
|
No code was inserted. And the test did NOT PASS.
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
RSpec.describe Mutant::Reporter::CLI::Printer::StatusProgressive do
|
2
4
|
setup_shared_context
|
3
5
|
|
@@ -7,7 +9,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::StatusProgressive do
|
|
7
9
|
context 'with empty scheduler' do
|
8
10
|
with(:env_result) { { subject_results: [] } }
|
9
11
|
|
10
|
-
it_reports
|
12
|
+
it_reports <<~REPORT
|
11
13
|
(00/02) 100% - killtime: 0.00s runtime: 4.00s overhead: 4.00s
|
12
14
|
REPORT
|
13
15
|
end
|
@@ -16,7 +18,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::StatusProgressive do
|
|
16
18
|
context 'without progress' do
|
17
19
|
with(:status) { { active_jobs: [].to_set } }
|
18
20
|
|
19
|
-
it_reports(
|
21
|
+
it_reports(<<~REPORT)
|
20
22
|
(02/02) 100% - killtime: 2.00s runtime: 4.00s overhead: 2.00s
|
21
23
|
REPORT
|
22
24
|
end
|
@@ -27,13 +29,13 @@ RSpec.describe Mutant::Reporter::CLI::Printer::StatusProgressive do
|
|
27
29
|
context 'on failure' do
|
28
30
|
with(:mutation_a_test_result) { { passed: true } }
|
29
31
|
|
30
|
-
it_reports(
|
32
|
+
it_reports(<<~REPORT)
|
31
33
|
(01/02) 50% - killtime: 2.00s runtime: 4.00s overhead: 2.00s
|
32
34
|
REPORT
|
33
35
|
end
|
34
36
|
|
35
37
|
context 'on success' do
|
36
|
-
it_reports(
|
38
|
+
it_reports(<<~REPORT)
|
37
39
|
(02/02) 100% - killtime: 2.00s runtime: 4.00s overhead: 2.00s
|
38
40
|
REPORT
|
39
41
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
RSpec.describe Mutant::Reporter::CLI::Printer::Status do
|
2
4
|
setup_shared_context
|
3
5
|
|
@@ -7,7 +9,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::Status do
|
|
7
9
|
context 'with empty scheduler' do
|
8
10
|
with(:env_result) { { subject_results: [] } }
|
9
11
|
|
10
|
-
it_reports
|
12
|
+
it_reports <<~REPORT
|
11
13
|
Mutant configuration:
|
12
14
|
Matcher: #<Mutant::Matcher::Config empty>
|
13
15
|
Integration: Mutant::Integration::Null
|
@@ -32,7 +34,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::Status do
|
|
32
34
|
context 'without progress' do
|
33
35
|
with(:status) { { active_jobs: [].to_set } }
|
34
36
|
|
35
|
-
it_reports(
|
37
|
+
it_reports(<<~REPORT)
|
36
38
|
Mutant configuration:
|
37
39
|
Matcher: #<Mutant::Matcher::Config empty>
|
38
40
|
Integration: Mutant::Integration::Null
|
@@ -59,7 +61,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::Status do
|
|
59
61
|
context 'on failure' do
|
60
62
|
with(:mutation_a_test_result) { { passed: true } }
|
61
63
|
|
62
|
-
it_reports(
|
64
|
+
it_reports(<<~REPORT)
|
63
65
|
Mutant configuration:
|
64
66
|
Matcher: #<Mutant::Matcher::Config empty>
|
65
67
|
Integration: Mutant::Integration::Null
|
@@ -87,7 +89,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::Status do
|
|
87
89
|
end
|
88
90
|
|
89
91
|
context 'on success' do
|
90
|
-
it_reports(
|
92
|
+
it_reports(<<~REPORT)
|
91
93
|
Mutant configuration:
|
92
94
|
Matcher: #<Mutant::Matcher::Config empty>
|
93
95
|
Integration: Mutant::Integration::Null
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
RSpec.describe Mutant::Reporter::CLI::Printer::SubjectProgress do
|
2
4
|
setup_shared_context
|
3
5
|
|
@@ -5,7 +7,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::SubjectProgress do
|
|
5
7
|
|
6
8
|
describe '.call' do
|
7
9
|
context 'on full coverage' do
|
8
|
-
it_reports
|
10
|
+
it_reports <<~'STR'
|
9
11
|
subject-a mutations: 2
|
10
12
|
..
|
11
13
|
(02/02) 100% - killtime: 2.00s runtime: 2.00s overhead: 0.00s
|
@@ -15,7 +17,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::SubjectProgress do
|
|
15
17
|
context 'on partial coverage' do
|
16
18
|
with(:mutation_a_test_result) { { passed: true } }
|
17
19
|
|
18
|
-
it_reports
|
20
|
+
it_reports <<~'STR'
|
19
21
|
subject-a mutations: 2
|
20
22
|
F.
|
21
23
|
(01/02) 50% - killtime: 2.00s runtime: 2.00s overhead: 0.00s
|
@@ -25,7 +27,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::SubjectProgress do
|
|
25
27
|
context 'without results' do
|
26
28
|
with(:subject_a_result) { { mutation_results: [] } }
|
27
29
|
|
28
|
-
it_reports
|
30
|
+
it_reports <<~'STR'
|
29
31
|
subject-a mutations: 2
|
30
32
|
(00/02) 100% - killtime: 0.00s runtime: 0.00s overhead: 0.00s
|
31
33
|
STR
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
RSpec.describe Mutant::Reporter::CLI::Printer::SubjectResult do
|
2
4
|
setup_shared_context
|
3
5
|
|
@@ -5,7 +7,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::SubjectResult do
|
|
5
7
|
|
6
8
|
describe '.call' do
|
7
9
|
context 'on full coverage' do
|
8
|
-
it_reports
|
10
|
+
it_reports <<~'STR'
|
9
11
|
subject-a
|
10
12
|
- test-a
|
11
13
|
STR
|
@@ -14,7 +16,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::SubjectResult do
|
|
14
16
|
context 'on partial coverage' do
|
15
17
|
with(:mutation_a_test_result) { { passed: true } }
|
16
18
|
|
17
|
-
it_reports
|
19
|
+
it_reports <<~'STR'
|
18
20
|
subject-a
|
19
21
|
- test-a
|
20
22
|
evil:subject-a:d27d2
|
@@ -28,7 +30,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer::SubjectResult do
|
|
28
30
|
context 'without results' do
|
29
31
|
with(:subject_a_result) { { mutation_results: [] } }
|
30
32
|
|
31
|
-
it_reports
|
33
|
+
it_reports <<~'STR'
|
32
34
|
subject-a
|
33
35
|
- test-a
|
34
36
|
STR
|
@@ -1,10 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
RSpec.describe Mutant::Reporter::CLI::Printer::TestResult do
|
2
4
|
setup_shared_context
|
3
5
|
|
4
6
|
let(:reportable) { mutation_a_test_result }
|
5
7
|
|
6
8
|
describe '.call' do
|
7
|
-
it_reports
|
9
|
+
it_reports <<~'STR'
|
8
10
|
- 1 @ runtime: 1.0
|
9
11
|
- test-a
|
10
12
|
Test Output:
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
RSpec.describe Mutant::Reporter::CLI::Printer do
|
2
4
|
let(:output) { StringIO.new }
|
3
5
|
|
@@ -8,7 +10,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer do
|
|
8
10
|
allow(output).to receive(:tty?).and_return(tty?)
|
9
11
|
subject
|
10
12
|
output.rewind
|
11
|
-
expect(output.read).to eql(
|
13
|
+
expect(output.read).to eql(expectation)
|
12
14
|
end
|
13
15
|
end
|
14
16
|
|
@@ -62,12 +64,12 @@ RSpec.describe Mutant::Reporter::CLI::Printer do
|
|
62
64
|
|
63
65
|
context 'on tty' do
|
64
66
|
context 'on success' do
|
65
|
-
it_reports Mutant::Color::GREEN.format('foo bar')
|
67
|
+
it_reports Mutant::Color::GREEN.format('foo bar') + "\n"
|
66
68
|
end
|
67
69
|
|
68
70
|
context 'on failure' do
|
69
71
|
let(:success?) { false }
|
70
|
-
it_reports Mutant::Color::RED.format('foo bar')
|
72
|
+
it_reports Mutant::Color::RED.format('foo bar') + "\n"
|
71
73
|
end
|
72
74
|
end
|
73
75
|
|
@@ -150,7 +152,7 @@ RSpec.describe Mutant::Reporter::CLI::Printer do
|
|
150
152
|
end
|
151
153
|
|
152
154
|
context 'when output is a tty?' do
|
153
|
-
it_reports Mutant::Color::RED.format('foo')
|
155
|
+
it_reports Mutant::Color::RED.format('foo') + "\n"
|
154
156
|
end
|
155
157
|
|
156
158
|
context 'when output is NOT a tty?' do
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
RSpec.describe Mutant::Reporter::CLI do
|
2
4
|
setup_shared_context
|
3
5
|
|
@@ -34,7 +36,7 @@ RSpec.describe Mutant::Reporter::CLI do
|
|
34
36
|
def self.it_reports(expected_content)
|
35
37
|
it 'writes expected report to output' do
|
36
38
|
expect(subject).to be(object)
|
37
|
-
expect(contents).to eql(
|
39
|
+
expect(contents).to eql(expected_content)
|
38
40
|
end
|
39
41
|
end
|
40
42
|
|
@@ -118,7 +120,7 @@ RSpec.describe Mutant::Reporter::CLI do
|
|
118
120
|
context 'on progressive format' do
|
119
121
|
let(:format) { progressive_format }
|
120
122
|
|
121
|
-
it_reports(
|
123
|
+
it_reports(<<~REPORT)
|
122
124
|
Mutant configuration:
|
123
125
|
Matcher: #<Mutant::Matcher::Config empty>
|
124
126
|
Integration: Mutant::Integration::Null
|
@@ -136,7 +138,7 @@ RSpec.describe Mutant::Reporter::CLI do
|
|
136
138
|
describe '#report' do
|
137
139
|
subject { object.report(env_result) }
|
138
140
|
|
139
|
-
it_reports(
|
141
|
+
it_reports(<<~REPORT)
|
140
142
|
Mutant configuration:
|
141
143
|
Matcher: #<Mutant::Matcher::Config empty>
|
142
144
|
Integration: Mutant::Integration::Null
|
@@ -162,7 +164,7 @@ RSpec.describe Mutant::Reporter::CLI do
|
|
162
164
|
context 'on framed format' do
|
163
165
|
let(:format) { framed_format }
|
164
166
|
|
165
|
-
it_reports(
|
167
|
+
it_reports(<<~REPORT)
|
166
168
|
[tput-restore]Mutant configuration:
|
167
169
|
Matcher: #<Mutant::Matcher::Config empty>
|
168
170
|
Integration: Mutant::Integration::Null
|
@@ -191,7 +193,7 @@ RSpec.describe Mutant::Reporter::CLI do
|
|
191
193
|
|
192
194
|
let(:tty?) { true }
|
193
195
|
|
194
|
-
it_reports Mutant::Color::GREEN.format('(00/02) 100% - killtime: 0.00s runtime: 4.00s overhead: 4.00s')
|
196
|
+
it_reports Mutant::Color::GREEN.format('(00/02) 100% - killtime: 0.00s runtime: 4.00s overhead: 4.00s') + "\n"
|
195
197
|
end
|
196
198
|
|
197
199
|
context 'with last mutation present' do
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
describe Mutant::Repository::Diff do
|
2
4
|
describe '#touches?' do
|
3
5
|
let(:object) do
|
@@ -27,8 +29,8 @@ describe Mutant::Repository::Diff do
|
|
27
29
|
subject { object.touches?(path, line_range) }
|
28
30
|
|
29
31
|
shared_context 'test if git tracks the file' do
|
30
|
-
# rubocop:disable Lint/UnneededSplatExpansion
|
31
32
|
before do
|
33
|
+
# rubocop:disable Lint/UnneededSplatExpansion
|
32
34
|
expect(config.kernel).to receive(:system)
|
33
35
|
.ordered
|
34
36
|
.with(
|