mutant 0.2.20 → 0.3.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +10 -11
- data/Changelog.md +93 -38
- data/Gemfile +3 -1
- data/Gemfile.devtools +16 -20
- data/Guardfile +1 -1
- data/README.md +36 -16
- data/Rakefile +21 -2
- data/TODO +11 -7
- data/bin/mutant +4 -0
- data/bin/zombie +4 -0
- data/config/devtools.yml +2 -0
- data/config/flay.yml +2 -2
- data/config/flog.yml +1 -1
- data/config/{site.reek → reek.yml} +94 -70
- data/lib/mutant/cli/classifier/method.rb +100 -0
- data/lib/mutant/cli/classifier/namespace.rb +47 -0
- data/lib/mutant/cli/classifier/scope.rb +35 -0
- data/lib/mutant/cli/classifier.rb +141 -0
- data/lib/mutant/cli.rb +115 -162
- data/lib/mutant/color.rb +2 -2
- data/lib/mutant/config.rb +27 -0
- data/lib/mutant/constants.rb +32 -17
- data/lib/mutant/context/scope.rb +33 -51
- data/lib/mutant/context.rb +8 -19
- data/lib/mutant/differ.rb +5 -5
- data/lib/mutant/helper.rb +2 -17
- data/lib/mutant/killer/forked.rb +44 -0
- data/lib/mutant/killer/forking.rb +3 -57
- data/lib/mutant/killer/rspec.rb +16 -20
- data/lib/mutant/killer/static.rb +6 -7
- data/lib/mutant/killer.rb +48 -74
- data/lib/mutant/loader.rb +6 -6
- data/lib/mutant/matcher/chain.rb +4 -25
- data/lib/mutant/matcher/method/instance.rb +14 -24
- data/lib/mutant/matcher/method/singleton.rb +35 -46
- data/lib/mutant/matcher/method.rb +95 -83
- data/lib/mutant/matcher/{scope_methods.rb → methods.rb} +53 -76
- data/lib/mutant/matcher/namespace.rb +71 -0
- data/lib/mutant/matcher/scope.rb +34 -0
- data/lib/mutant/matcher.rb +24 -34
- data/lib/mutant/mutation/evil.rb +35 -0
- data/lib/mutant/mutation/filter/code.rb +7 -28
- data/lib/mutant/mutation/filter/regexp.rb +6 -18
- data/lib/mutant/mutation/filter/whitelist.rb +5 -4
- data/lib/mutant/mutation/filter.rb +10 -9
- data/lib/mutant/mutation/neutral.rb +35 -0
- data/lib/mutant/mutation.rb +21 -61
- data/lib/mutant/mutator/node/argument.rb +88 -0
- data/lib/mutant/mutator/node/arguments.rb +52 -0
- data/lib/mutant/mutator/node/assignment.rb +34 -38
- data/lib/mutant/mutator/node/begin.rb +33 -0
- data/lib/mutant/mutator/node/block.rb +14 -14
- data/lib/mutant/mutator/node/case.rb +59 -0
- data/lib/mutant/mutator/node/define.rb +26 -22
- data/lib/mutant/mutator/node/if.rb +31 -71
- data/lib/mutant/mutator/node/literal/array.rb +25 -9
- data/lib/mutant/mutator/node/literal/boolean.rb +13 -30
- data/lib/mutant/mutator/node/literal/dynamic.rb +6 -5
- data/lib/mutant/mutator/node/literal/fixnum.rb +18 -7
- data/lib/mutant/mutator/node/literal/float.rb +15 -8
- data/lib/mutant/mutator/node/literal/hash.rb +33 -52
- data/lib/mutant/mutator/node/literal/nil.rb +8 -7
- data/lib/mutant/mutator/node/literal/range.rb +25 -50
- data/lib/mutant/mutator/node/literal/regex.rb +15 -23
- data/lib/mutant/mutator/node/literal/string.rb +7 -6
- data/lib/mutant/mutator/node/literal/symbol.rb +7 -6
- data/lib/mutant/mutator/node/literal.rb +4 -46
- data/lib/mutant/mutator/node/mlhs.rb +27 -0
- data/lib/mutant/mutator/node/noop.rb +18 -43
- data/lib/mutant/mutator/node/return.rb +8 -8
- data/lib/mutant/mutator/node/send/binary.rb +31 -0
- data/lib/mutant/mutator/node/send.rb +106 -72
- data/lib/mutant/mutator/node/super.rb +15 -20
- data/lib/mutant/mutator/node/when.rb +32 -7
- data/lib/mutant/mutator/node/while.rb +9 -7
- data/lib/mutant/mutator/node.rb +116 -66
- data/lib/mutant/mutator/registry.rb +14 -11
- data/lib/mutant/mutator/util/array.rb +9 -9
- data/lib/mutant/mutator/util/symbol.rb +6 -20
- data/lib/mutant/mutator/util.rb +6 -3
- data/lib/mutant/mutator.rb +12 -28
- data/lib/mutant/node_helpers.rb +28 -0
- data/lib/mutant/random.rb +3 -2
- data/lib/mutant/reporter/cli/printer/config.rb +174 -0
- data/lib/mutant/reporter/cli/printer/killer.rb +42 -0
- data/lib/mutant/reporter/cli/printer/mutation.rb +55 -0
- data/lib/mutant/reporter/cli/printer/subject.rb +147 -0
- data/lib/mutant/reporter/cli/printer.rb +165 -0
- data/lib/mutant/reporter/cli.rb +9 -277
- data/lib/mutant/reporter/null.rb +6 -30
- data/lib/mutant/reporter.rb +6 -73
- data/lib/mutant/runner/config.rb +82 -0
- data/lib/mutant/runner/mutation.rb +58 -0
- data/lib/mutant/runner/subject.rb +81 -0
- data/lib/mutant/runner.rb +42 -92
- data/lib/mutant/singleton_methods.rb +2 -2
- data/lib/mutant/strategy/method_expansion.rb +51 -0
- data/lib/mutant/strategy/rspec/dm2/lookup/method.rb +142 -0
- data/lib/mutant/strategy/rspec/dm2/lookup.rb +61 -0
- data/lib/mutant/strategy/rspec/dm2.rb +22 -0
- data/lib/mutant/strategy/rspec.rb +20 -22
- data/lib/mutant/strategy/static.rb +18 -0
- data/lib/mutant/strategy.rb +15 -50
- data/lib/mutant/subject/method.rb +100 -0
- data/lib/mutant/subject.rb +18 -49
- data/lib/mutant/support/method_object.rb +4 -2
- data/lib/mutant.rb +40 -35
- data/mutant.gemspec +9 -8
- data/spec/integration/mutant/rspec_killer_spec.rb +3 -3
- data/spec/integration/mutant/test_mutator_handles_types_spec.rb +9 -0
- data/spec/integration/mutant/zombie_spec.rb +1 -1
- data/spec/shared/method_matcher_behavior.rb +35 -0
- data/spec/shared/mutator_behavior.rb +63 -32
- data/spec/spec_helper.rb +13 -3
- data/spec/support/ice_nine_config.rb +8 -0
- data/spec/support/rspec.rb +1 -1
- data/spec/support/zombie.rb +1 -1
- data/spec/unit/mutant/cli/class_methods/new_spec.rb +42 -28
- data/spec/unit/mutant/cli/class_methods/run_spec.rb +15 -13
- data/spec/unit/mutant/cli/classifier/class_methods/build_spec.rb +44 -0
- data/spec/unit/mutant/context/scope/root_spec.rb +4 -4
- data/spec/unit/mutant/killer/rspec/class_methods/new_spec.rb +6 -5
- data/spec/unit/mutant/killer/success_predicate_spec.rb +28 -0
- data/spec/unit/mutant/loader/eval/class_methods/run_spec.rb +1 -1
- data/spec/unit/mutant/matcher/chain/each_spec.rb +1 -1
- data/spec/unit/mutant/matcher/chain/matchers_spec.rb +1 -1
- data/spec/unit/mutant/matcher/method/instance/each_spec.rb +112 -0
- data/spec/unit/mutant/matcher/method/singleton/each_spec.rb +93 -0
- data/spec/unit/mutant/matcher/methods/instance/each_spec.rb +59 -0
- data/spec/unit/mutant/matcher/methods/singleton/each_spec.rb +53 -0
- data/spec/unit/mutant/matcher/namespace/each_spec.rb +37 -0
- data/spec/unit/mutant/mutator/node/begin/mutation_spec.rb +33 -0
- data/spec/unit/mutant/mutator/node/block/mutation_spec.rb +42 -14
- data/spec/unit/mutant/mutator/node/case/mutation_spec.rb +319 -0
- data/spec/unit/mutant/mutator/node/define/mutation_spec.rb +31 -27
- data/spec/unit/mutant/mutator/node/if/mutation_spec.rb +75 -0
- data/spec/unit/mutant/mutator/node/literal/fixnum_spec.rb +1 -1
- data/spec/unit/mutant/mutator/node/literal/hash_spec.rb +2 -2
- data/spec/unit/mutant/mutator/node/literal/nil_spec.rb +1 -3
- data/spec/unit/mutant/mutator/node/literal/regex_spec.rb +1 -9
- data/spec/unit/mutant/mutator/node/return/mutation_spec.rb +6 -2
- data/spec/unit/mutant/mutator/node/send/mutation_spec.rb +111 -108
- data/spec/unit/mutant/mutator/node/super/mutation_spec.rb +0 -33
- data/spec/unit/mutant/mutator/node/while/mutation_spec.rb +2 -2
- data/spec/unit/mutant/runner/config/subjects_spec.rb +38 -0
- data/spec/unit/mutant/runner/config/success_predicate_spec.rb +53 -0
- data/spec/unit/mutant/runner/failed_predicte_spec.rb +33 -0
- data/spec/unit/mutant/runner/mutation/killer_spec.rb +39 -0
- data/spec/unit/mutant/runner/subject/success_predicate_spec.rb +49 -0
- data/spec/unit/mutant/strategy/method_expansion/class_methods/run_spec.rb +49 -0
- data/spec/unit/mutant/strategy/rspec/dm2/lookup/method/instance/spec_files_spec.rb +52 -0
- data/spec/unit/mutant/strategy/rspec/dm2/lookup/method/singleton/spec_files_spec.rb +42 -0
- data/spec/unit/mutant/subject/context_spec.rb +6 -3
- data/spec/unit/mutant/subject/each_spec.rb +11 -8
- data/spec/unit/mutant/subject/node_spec.rb +6 -2
- data/test_app/spec/shared/method_filter_parse_behavior.rb +0 -2
- data/test_app/spec/shared/method_match_behavior.rb +1 -1
- data/test_app/spec/spec_helper.rb +4 -2
- metadata +101 -109
- data/config/roodi.yml +0 -26
- data/lib/mutant/matcher/method/classifier.rb +0 -141
- data/lib/mutant/matcher/object_space.rb +0 -114
- data/lib/mutant/mutator/node/actual_arguments.rb +0 -25
- data/lib/mutant/mutator/node/default_arguments.rb +0 -25
- data/lib/mutant/mutator/node/formal_arguments_19/default_mutations.rb +0 -33
- data/lib/mutant/mutator/node/formal_arguments_19/pattern_argument_expansion.rb +0 -35
- data/lib/mutant/mutator/node/formal_arguments_19/require_defaults.rb +0 -37
- data/lib/mutant/mutator/node/formal_arguments_19.rb +0 -41
- data/lib/mutant/mutator/node/iter_19.rb +0 -27
- data/lib/mutant/mutator/node/literal/empty_array.rb +0 -26
- data/lib/mutant/mutator/node/pattern_arguments.rb +0 -41
- data/lib/mutant/mutator/node/pattern_variable.rb +0 -23
- data/lib/mutant/mutator/node/receiver_case.rb +0 -122
- data/lib/mutant/mutator/node/send/binary_operator_method.rb +0 -61
- data/lib/mutant/mutator/node/send/with_arguments.rb +0 -81
- data/lib/mutant/reporter/stats.rb +0 -120
- data/lib/mutant/strategy/rspec/example_lookup.rb +0 -163
- data/spec/integration/mutant/method_matching_spec.rb +0 -269
- data/spec/shared/method_match_behavior.rb +0 -39
- data/spec/unit/mutant/killer/fail_ques_spec.rb +0 -39
- data/spec/unit/mutant/matcher/class_methods/from_string_spec.rb +0 -49
- data/spec/unit/mutant/matcher/class_methods/parse_spec.rb +0 -12
- data/spec/unit/mutant/matcher/method/class_methods/parse_spec.rb +0 -21
- data/spec/unit/mutant/matcher/method/classifier/class_methods/run_spec.rb +0 -52
- data/spec/unit/mutant/matcher/object_space/class_methods/parse_spec.rb +0 -24
- data/spec/unit/mutant/matcher/object_space/each_spec.rb +0 -31
- data/spec/unit/mutant/mutator/node/if_statement/mutation_spec.rb +0 -60
- data/spec/unit/mutant/mutator/node/receiver_case/mutation_spec.rb +0 -27
- data/spec/unit/mutant/strategy/rspec/example_lookup/spec_file_spec.rb +0 -236
- data/spec/unit/mutant/subject/class_methods/new_spec.rb +0 -13
- data/tasks/metrics/ci.rake +0 -7
- data/tasks/metrics/flay.rake +0 -41
- data/tasks/metrics/flog.rake +0 -43
- data/tasks/metrics/heckle.rake +0 -216
- data/tasks/metrics/metric_fu.rake +0 -31
- data/tasks/metrics/reek.rake +0 -15
- data/tasks/metrics/roodi.rake +0 -15
- data/tasks/metrics/yardstick.rake +0 -23
- data/tasks/spec.rake +0 -45
- data/tasks/yard.rake +0 -9
metadata
CHANGED
@@ -1,74 +1,60 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mutant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.0.beta2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Markus Schirp
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-06-24 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
14
|
+
name: parser
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
22
|
-
- - ! '>='
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version: 3.0.3
|
19
|
+
version: 2.0.beta7
|
25
20
|
type: :runtime
|
26
21
|
prerelease: false
|
27
22
|
version_requirements: !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
29
23
|
requirements:
|
30
24
|
- - ~>
|
31
25
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
33
|
-
- - ! '>='
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version: 3.0.3
|
26
|
+
version: 2.0.beta7
|
36
27
|
- !ruby/object:Gem::Dependency
|
37
|
-
name:
|
28
|
+
name: unparser
|
38
29
|
requirement: !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
30
|
requirements:
|
41
31
|
- - ~>
|
42
32
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.
|
33
|
+
version: 0.0.4
|
44
34
|
type: :runtime
|
45
35
|
prerelease: false
|
46
36
|
version_requirements: !ruby/object:Gem::Requirement
|
47
|
-
none: false
|
48
37
|
requirements:
|
49
38
|
- - ~>
|
50
39
|
- !ruby/object:Gem::Version
|
51
|
-
version: 0.
|
40
|
+
version: 0.0.4
|
52
41
|
- !ruby/object:Gem::Dependency
|
53
42
|
name: ice_nine
|
54
43
|
requirement: !ruby/object:Gem::Requirement
|
55
|
-
none: false
|
56
44
|
requirements:
|
57
45
|
- - ~>
|
58
46
|
- !ruby/object:Gem::Version
|
59
|
-
version: 0.
|
47
|
+
version: 0.8.0
|
60
48
|
type: :runtime
|
61
49
|
prerelease: false
|
62
50
|
version_requirements: !ruby/object:Gem::Requirement
|
63
|
-
none: false
|
64
51
|
requirements:
|
65
52
|
- - ~>
|
66
53
|
- !ruby/object:Gem::Version
|
67
|
-
version: 0.
|
54
|
+
version: 0.8.0
|
68
55
|
- !ruby/object:Gem::Dependency
|
69
56
|
name: descendants_tracker
|
70
57
|
requirement: !ruby/object:Gem::Requirement
|
71
|
-
none: false
|
72
58
|
requirements:
|
73
59
|
- - ~>
|
74
60
|
- !ruby/object:Gem::Version
|
@@ -76,7 +62,6 @@ dependencies:
|
|
76
62
|
type: :runtime
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
none: false
|
80
65
|
requirements:
|
81
66
|
- - ~>
|
82
67
|
- !ruby/object:Gem::Version
|
@@ -84,23 +69,20 @@ dependencies:
|
|
84
69
|
- !ruby/object:Gem::Dependency
|
85
70
|
name: adamantium
|
86
71
|
requirement: !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
72
|
requirements:
|
89
73
|
- - ~>
|
90
74
|
- !ruby/object:Gem::Version
|
91
|
-
version: 0.0.
|
75
|
+
version: 0.0.8
|
92
76
|
type: :runtime
|
93
77
|
prerelease: false
|
94
78
|
version_requirements: !ruby/object:Gem::Requirement
|
95
|
-
none: false
|
96
79
|
requirements:
|
97
80
|
- - ~>
|
98
81
|
- !ruby/object:Gem::Version
|
99
|
-
version: 0.0.
|
82
|
+
version: 0.0.8
|
100
83
|
- !ruby/object:Gem::Dependency
|
101
84
|
name: equalizer
|
102
85
|
requirement: !ruby/object:Gem::Requirement
|
103
|
-
none: false
|
104
86
|
requirements:
|
105
87
|
- - ~>
|
106
88
|
- !ruby/object:Gem::Version
|
@@ -108,7 +90,6 @@ dependencies:
|
|
108
90
|
type: :runtime
|
109
91
|
prerelease: false
|
110
92
|
version_requirements: !ruby/object:Gem::Requirement
|
111
|
-
none: false
|
112
93
|
requirements:
|
113
94
|
- - ~>
|
114
95
|
- !ruby/object:Gem::Version
|
@@ -116,7 +97,6 @@ dependencies:
|
|
116
97
|
- !ruby/object:Gem::Dependency
|
117
98
|
name: inflecto
|
118
99
|
requirement: !ruby/object:Gem::Requirement
|
119
|
-
none: false
|
120
100
|
requirements:
|
121
101
|
- - ~>
|
122
102
|
- !ruby/object:Gem::Version
|
@@ -124,47 +104,41 @@ dependencies:
|
|
124
104
|
type: :runtime
|
125
105
|
prerelease: false
|
126
106
|
version_requirements: !ruby/object:Gem::Requirement
|
127
|
-
none: false
|
128
107
|
requirements:
|
129
108
|
- - ~>
|
130
109
|
- !ruby/object:Gem::Version
|
131
110
|
version: 0.0.2
|
132
111
|
- !ruby/object:Gem::Dependency
|
133
|
-
name:
|
112
|
+
name: anima
|
134
113
|
requirement: !ruby/object:Gem::Requirement
|
135
|
-
none: false
|
136
114
|
requirements:
|
137
115
|
- - ~>
|
138
116
|
- !ruby/object:Gem::Version
|
139
|
-
version: 0.0.
|
117
|
+
version: 0.0.6
|
140
118
|
type: :runtime
|
141
119
|
prerelease: false
|
142
120
|
version_requirements: !ruby/object:Gem::Requirement
|
143
|
-
none: false
|
144
121
|
requirements:
|
145
122
|
- - ~>
|
146
123
|
- !ruby/object:Gem::Version
|
147
|
-
version: 0.0.
|
124
|
+
version: 0.0.6
|
148
125
|
- !ruby/object:Gem::Dependency
|
149
|
-
name:
|
126
|
+
name: concord
|
150
127
|
requirement: !ruby/object:Gem::Requirement
|
151
|
-
none: false
|
152
128
|
requirements:
|
153
129
|
- - ~>
|
154
130
|
- !ruby/object:Gem::Version
|
155
|
-
version: 1.
|
131
|
+
version: 0.1.1
|
156
132
|
type: :runtime
|
157
133
|
prerelease: false
|
158
134
|
version_requirements: !ruby/object:Gem::Requirement
|
159
|
-
none: false
|
160
135
|
requirements:
|
161
136
|
- - ~>
|
162
137
|
- !ruby/object:Gem::Version
|
163
|
-
version: 1.
|
138
|
+
version: 0.1.1
|
164
139
|
- !ruby/object:Gem::Dependency
|
165
140
|
name: rspec
|
166
141
|
requirement: !ruby/object:Gem::Requirement
|
167
|
-
none: false
|
168
142
|
requirements:
|
169
143
|
- - ~>
|
170
144
|
- !ruby/object:Gem::Version
|
@@ -172,14 +146,13 @@ dependencies:
|
|
172
146
|
type: :runtime
|
173
147
|
prerelease: false
|
174
148
|
version_requirements: !ruby/object:Gem::Requirement
|
175
|
-
none: false
|
176
149
|
requirements:
|
177
150
|
- - ~>
|
178
151
|
- !ruby/object:Gem::Version
|
179
152
|
version: 2.13.0
|
180
153
|
description: Mutation testing for ruby
|
181
154
|
email:
|
182
|
-
- mbj@
|
155
|
+
- mbj@schirp-dso.com
|
183
156
|
executables:
|
184
157
|
- mutant
|
185
158
|
extensions: []
|
@@ -200,20 +173,26 @@ files:
|
|
200
173
|
- TODO
|
201
174
|
- bin/mutant
|
202
175
|
- bin/zombie
|
176
|
+
- config/devtools.yml
|
203
177
|
- config/flay.yml
|
204
178
|
- config/flog.yml
|
205
|
-
- config/
|
206
|
-
- config/site.reek
|
179
|
+
- config/reek.yml
|
207
180
|
- config/yardstick.yml
|
208
181
|
- lib/mutant.rb
|
209
182
|
- lib/mutant/cli.rb
|
183
|
+
- lib/mutant/cli/classifier.rb
|
184
|
+
- lib/mutant/cli/classifier/method.rb
|
185
|
+
- lib/mutant/cli/classifier/namespace.rb
|
186
|
+
- lib/mutant/cli/classifier/scope.rb
|
210
187
|
- lib/mutant/color.rb
|
188
|
+
- lib/mutant/config.rb
|
211
189
|
- lib/mutant/constants.rb
|
212
190
|
- lib/mutant/context.rb
|
213
191
|
- lib/mutant/context/scope.rb
|
214
192
|
- lib/mutant/differ.rb
|
215
193
|
- lib/mutant/helper.rb
|
216
194
|
- lib/mutant/killer.rb
|
195
|
+
- lib/mutant/killer/forked.rb
|
217
196
|
- lib/mutant/killer/forking.rb
|
218
197
|
- lib/mutant/killer/rspec.rb
|
219
198
|
- lib/mutant/killer/static.rb
|
@@ -221,34 +200,32 @@ files:
|
|
221
200
|
- lib/mutant/matcher.rb
|
222
201
|
- lib/mutant/matcher/chain.rb
|
223
202
|
- lib/mutant/matcher/method.rb
|
224
|
-
- lib/mutant/matcher/method/classifier.rb
|
225
203
|
- lib/mutant/matcher/method/instance.rb
|
226
204
|
- lib/mutant/matcher/method/singleton.rb
|
227
|
-
- lib/mutant/matcher/
|
228
|
-
- lib/mutant/matcher/
|
205
|
+
- lib/mutant/matcher/methods.rb
|
206
|
+
- lib/mutant/matcher/namespace.rb
|
207
|
+
- lib/mutant/matcher/scope.rb
|
229
208
|
- lib/mutant/mutation.rb
|
209
|
+
- lib/mutant/mutation/evil.rb
|
230
210
|
- lib/mutant/mutation/filter.rb
|
231
211
|
- lib/mutant/mutation/filter/code.rb
|
232
212
|
- lib/mutant/mutation/filter/regexp.rb
|
233
213
|
- lib/mutant/mutation/filter/whitelist.rb
|
214
|
+
- lib/mutant/mutation/neutral.rb
|
234
215
|
- lib/mutant/mutator.rb
|
235
216
|
- lib/mutant/mutator/node.rb
|
236
|
-
- lib/mutant/mutator/node/
|
217
|
+
- lib/mutant/mutator/node/argument.rb
|
218
|
+
- lib/mutant/mutator/node/arguments.rb
|
237
219
|
- lib/mutant/mutator/node/assignment.rb
|
220
|
+
- lib/mutant/mutator/node/begin.rb
|
238
221
|
- lib/mutant/mutator/node/block.rb
|
239
|
-
- lib/mutant/mutator/node/
|
222
|
+
- lib/mutant/mutator/node/case.rb
|
240
223
|
- lib/mutant/mutator/node/define.rb
|
241
|
-
- lib/mutant/mutator/node/formal_arguments_19.rb
|
242
|
-
- lib/mutant/mutator/node/formal_arguments_19/default_mutations.rb
|
243
|
-
- lib/mutant/mutator/node/formal_arguments_19/pattern_argument_expansion.rb
|
244
|
-
- lib/mutant/mutator/node/formal_arguments_19/require_defaults.rb
|
245
224
|
- lib/mutant/mutator/node/if.rb
|
246
|
-
- lib/mutant/mutator/node/iter_19.rb
|
247
225
|
- lib/mutant/mutator/node/literal.rb
|
248
226
|
- lib/mutant/mutator/node/literal/array.rb
|
249
227
|
- lib/mutant/mutator/node/literal/boolean.rb
|
250
228
|
- lib/mutant/mutator/node/literal/dynamic.rb
|
251
|
-
- lib/mutant/mutator/node/literal/empty_array.rb
|
252
229
|
- lib/mutant/mutator/node/literal/fixnum.rb
|
253
230
|
- lib/mutant/mutator/node/literal/float.rb
|
254
231
|
- lib/mutant/mutator/node/literal/hash.rb
|
@@ -257,14 +234,11 @@ files:
|
|
257
234
|
- lib/mutant/mutator/node/literal/regex.rb
|
258
235
|
- lib/mutant/mutator/node/literal/string.rb
|
259
236
|
- lib/mutant/mutator/node/literal/symbol.rb
|
237
|
+
- lib/mutant/mutator/node/mlhs.rb
|
260
238
|
- lib/mutant/mutator/node/noop.rb
|
261
|
-
- lib/mutant/mutator/node/pattern_arguments.rb
|
262
|
-
- lib/mutant/mutator/node/pattern_variable.rb
|
263
|
-
- lib/mutant/mutator/node/receiver_case.rb
|
264
239
|
- lib/mutant/mutator/node/return.rb
|
265
240
|
- lib/mutant/mutator/node/send.rb
|
266
|
-
- lib/mutant/mutator/node/send/
|
267
|
-
- lib/mutant/mutator/node/send/with_arguments.rb
|
241
|
+
- lib/mutant/mutator/node/send/binary.rb
|
268
242
|
- lib/mutant/mutator/node/super.rb
|
269
243
|
- lib/mutant/mutator/node/when.rb
|
270
244
|
- lib/mutant/mutator/node/while.rb
|
@@ -272,56 +246,72 @@ files:
|
|
272
246
|
- lib/mutant/mutator/util.rb
|
273
247
|
- lib/mutant/mutator/util/array.rb
|
274
248
|
- lib/mutant/mutator/util/symbol.rb
|
249
|
+
- lib/mutant/node_helpers.rb
|
275
250
|
- lib/mutant/random.rb
|
276
251
|
- lib/mutant/reporter.rb
|
277
252
|
- lib/mutant/reporter/cli.rb
|
253
|
+
- lib/mutant/reporter/cli/printer.rb
|
254
|
+
- lib/mutant/reporter/cli/printer/config.rb
|
255
|
+
- lib/mutant/reporter/cli/printer/killer.rb
|
256
|
+
- lib/mutant/reporter/cli/printer/mutation.rb
|
257
|
+
- lib/mutant/reporter/cli/printer/subject.rb
|
278
258
|
- lib/mutant/reporter/null.rb
|
279
|
-
- lib/mutant/reporter/stats.rb
|
280
259
|
- lib/mutant/runner.rb
|
260
|
+
- lib/mutant/runner/config.rb
|
261
|
+
- lib/mutant/runner/mutation.rb
|
262
|
+
- lib/mutant/runner/subject.rb
|
281
263
|
- lib/mutant/singleton_methods.rb
|
282
264
|
- lib/mutant/strategy.rb
|
265
|
+
- lib/mutant/strategy/method_expansion.rb
|
283
266
|
- lib/mutant/strategy/rspec.rb
|
284
|
-
- lib/mutant/strategy/rspec/
|
267
|
+
- lib/mutant/strategy/rspec/dm2.rb
|
268
|
+
- lib/mutant/strategy/rspec/dm2/lookup.rb
|
269
|
+
- lib/mutant/strategy/rspec/dm2/lookup/method.rb
|
270
|
+
- lib/mutant/strategy/static.rb
|
285
271
|
- lib/mutant/subject.rb
|
272
|
+
- lib/mutant/subject/method.rb
|
286
273
|
- lib/mutant/support/method_object.rb
|
287
274
|
- mutant.gemspec
|
288
275
|
- spec/integration/mutant/differ_spec.rb
|
289
|
-
- spec/integration/mutant/method_matching_spec.rb
|
290
276
|
- spec/integration/mutant/rspec_killer_spec.rb
|
291
277
|
- spec/integration/mutant/runner_spec.rb
|
278
|
+
- spec/integration/mutant/test_mutator_handles_types_spec.rb
|
292
279
|
- spec/integration/mutant/zombie_spec.rb
|
293
280
|
- spec/rcov.opts
|
294
|
-
- spec/shared/
|
281
|
+
- spec/shared/method_matcher_behavior.rb
|
295
282
|
- spec/shared/mutator_behavior.rb
|
296
283
|
- spec/spec_helper.rb
|
297
284
|
- spec/support/compress_helper.rb
|
285
|
+
- spec/support/ice_nine_config.rb
|
298
286
|
- spec/support/rspec.rb
|
299
287
|
- spec/support/test_app.rb
|
300
288
|
- spec/support/zombie.rb
|
301
289
|
- spec/unit/mutant/cli/class_methods/new_spec.rb
|
302
290
|
- spec/unit/mutant/cli/class_methods/run_spec.rb
|
291
|
+
- spec/unit/mutant/cli/classifier/class_methods/build_spec.rb
|
303
292
|
- spec/unit/mutant/context/root_spec.rb
|
304
293
|
- spec/unit/mutant/context/scope/root_spec.rb
|
305
294
|
- spec/unit/mutant/context/scope/unqualified_name_spec.rb
|
306
|
-
- spec/unit/mutant/killer/fail_ques_spec.rb
|
307
295
|
- spec/unit/mutant/killer/rspec/class_methods/new_spec.rb
|
296
|
+
- spec/unit/mutant/killer/success_predicate_spec.rb
|
308
297
|
- spec/unit/mutant/loader/eval/class_methods/run_spec.rb
|
309
298
|
- spec/unit/mutant/matcher/chain/each_spec.rb
|
310
299
|
- spec/unit/mutant/matcher/chain/matchers_spec.rb
|
311
|
-
- spec/unit/mutant/matcher/class_methods/from_string_spec.rb
|
312
|
-
- spec/unit/mutant/matcher/class_methods/parse_spec.rb
|
313
300
|
- spec/unit/mutant/matcher/each_spec.rb
|
314
|
-
- spec/unit/mutant/matcher/method/
|
315
|
-
- spec/unit/mutant/matcher/method/
|
316
|
-
- spec/unit/mutant/matcher/
|
317
|
-
- spec/unit/mutant/matcher/
|
301
|
+
- spec/unit/mutant/matcher/method/instance/each_spec.rb
|
302
|
+
- spec/unit/mutant/matcher/method/singleton/each_spec.rb
|
303
|
+
- spec/unit/mutant/matcher/methods/instance/each_spec.rb
|
304
|
+
- spec/unit/mutant/matcher/methods/singleton/each_spec.rb
|
305
|
+
- spec/unit/mutant/matcher/namespace/each_spec.rb
|
318
306
|
- spec/unit/mutant/mutator/each_spec.rb
|
319
307
|
- spec/unit/mutant/mutator/emit_new_spec.rb
|
320
308
|
- spec/unit/mutant/mutator/emit_spec.rb
|
321
309
|
- spec/unit/mutant/mutator/node/assignment/mutation_spec.rb
|
310
|
+
- spec/unit/mutant/mutator/node/begin/mutation_spec.rb
|
322
311
|
- spec/unit/mutant/mutator/node/block/mutation_spec.rb
|
312
|
+
- spec/unit/mutant/mutator/node/case/mutation_spec.rb
|
323
313
|
- spec/unit/mutant/mutator/node/define/mutation_spec.rb
|
324
|
-
- spec/unit/mutant/mutator/node/
|
314
|
+
- spec/unit/mutant/mutator/node/if/mutation_spec.rb
|
325
315
|
- spec/unit/mutant/mutator/node/literal/array_spec.rb
|
326
316
|
- spec/unit/mutant/mutator/node/literal/boolean/mutation_spec.rb
|
327
317
|
- spec/unit/mutant/mutator/node/literal/empty_array_spec.rb
|
@@ -333,27 +323,22 @@ files:
|
|
333
323
|
- spec/unit/mutant/mutator/node/literal/regex_spec.rb
|
334
324
|
- spec/unit/mutant/mutator/node/literal/string_spec.rb
|
335
325
|
- spec/unit/mutant/mutator/node/literal/symbol_spec.rb
|
336
|
-
- spec/unit/mutant/mutator/node/receiver_case/mutation_spec.rb
|
337
326
|
- spec/unit/mutant/mutator/node/return/mutation_spec.rb
|
338
327
|
- spec/unit/mutant/mutator/node/send/mutation_spec.rb
|
339
328
|
- spec/unit/mutant/mutator/node/super/mutation_spec.rb
|
340
329
|
- spec/unit/mutant/mutator/node/while/mutation_spec.rb
|
341
330
|
- spec/unit/mutant/mutator/self_spec.rb
|
342
|
-
- spec/unit/mutant/
|
343
|
-
- spec/unit/mutant/
|
331
|
+
- spec/unit/mutant/runner/config/subjects_spec.rb
|
332
|
+
- spec/unit/mutant/runner/config/success_predicate_spec.rb
|
333
|
+
- spec/unit/mutant/runner/failed_predicte_spec.rb
|
334
|
+
- spec/unit/mutant/runner/mutation/killer_spec.rb
|
335
|
+
- spec/unit/mutant/runner/subject/success_predicate_spec.rb
|
336
|
+
- spec/unit/mutant/strategy/method_expansion/class_methods/run_spec.rb
|
337
|
+
- spec/unit/mutant/strategy/rspec/dm2/lookup/method/instance/spec_files_spec.rb
|
338
|
+
- spec/unit/mutant/strategy/rspec/dm2/lookup/method/singleton/spec_files_spec.rb
|
344
339
|
- spec/unit/mutant/subject/context_spec.rb
|
345
340
|
- spec/unit/mutant/subject/each_spec.rb
|
346
341
|
- spec/unit/mutant/subject/node_spec.rb
|
347
|
-
- tasks/metrics/ci.rake
|
348
|
-
- tasks/metrics/flay.rake
|
349
|
-
- tasks/metrics/flog.rake
|
350
|
-
- tasks/metrics/heckle.rake
|
351
|
-
- tasks/metrics/metric_fu.rake
|
352
|
-
- tasks/metrics/reek.rake
|
353
|
-
- tasks/metrics/roodi.rake
|
354
|
-
- tasks/metrics/yardstick.rake
|
355
|
-
- tasks/spec.rake
|
356
|
-
- tasks/yard.rake
|
357
342
|
- test_app/.rspec
|
358
343
|
- test_app/lib/test_app.rb
|
359
344
|
- test_app/lib/test_app/literal.rb
|
@@ -370,66 +355,68 @@ files:
|
|
370
355
|
- test_app/spec/unit/test_app/literal/string_spec.rb
|
371
356
|
homepage: https://github.com/mbj/mutant
|
372
357
|
licenses: []
|
358
|
+
metadata: {}
|
373
359
|
post_install_message:
|
374
360
|
rdoc_options: []
|
375
361
|
require_paths:
|
376
362
|
- lib
|
377
363
|
required_ruby_version: !ruby/object:Gem::Requirement
|
378
|
-
none: false
|
379
364
|
requirements:
|
380
|
-
- -
|
365
|
+
- - '>='
|
381
366
|
- !ruby/object:Gem::Version
|
382
367
|
version: '0'
|
383
368
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
384
|
-
none: false
|
385
369
|
requirements:
|
386
|
-
- -
|
370
|
+
- - '>'
|
387
371
|
- !ruby/object:Gem::Version
|
388
|
-
version:
|
372
|
+
version: 1.3.1
|
389
373
|
requirements: []
|
390
374
|
rubyforge_project:
|
391
|
-
rubygems_version:
|
375
|
+
rubygems_version: 2.0.2
|
392
376
|
signing_key:
|
393
|
-
specification_version:
|
377
|
+
specification_version: 4
|
394
378
|
summary: Mutation testing tool for ruby under MRI and Rubinius
|
395
379
|
test_files:
|
396
380
|
- spec/integration/mutant/differ_spec.rb
|
397
|
-
- spec/integration/mutant/method_matching_spec.rb
|
398
381
|
- spec/integration/mutant/rspec_killer_spec.rb
|
399
382
|
- spec/integration/mutant/runner_spec.rb
|
383
|
+
- spec/integration/mutant/test_mutator_handles_types_spec.rb
|
400
384
|
- spec/integration/mutant/zombie_spec.rb
|
401
385
|
- spec/rcov.opts
|
402
|
-
- spec/shared/
|
386
|
+
- spec/shared/method_matcher_behavior.rb
|
403
387
|
- spec/shared/mutator_behavior.rb
|
404
388
|
- spec/spec_helper.rb
|
405
389
|
- spec/support/compress_helper.rb
|
390
|
+
- spec/support/ice_nine_config.rb
|
406
391
|
- spec/support/rspec.rb
|
407
392
|
- spec/support/test_app.rb
|
408
393
|
- spec/support/zombie.rb
|
409
394
|
- spec/unit/mutant/cli/class_methods/new_spec.rb
|
410
395
|
- spec/unit/mutant/cli/class_methods/run_spec.rb
|
396
|
+
- spec/unit/mutant/cli/classifier/class_methods/build_spec.rb
|
411
397
|
- spec/unit/mutant/context/root_spec.rb
|
412
398
|
- spec/unit/mutant/context/scope/root_spec.rb
|
413
399
|
- spec/unit/mutant/context/scope/unqualified_name_spec.rb
|
414
|
-
- spec/unit/mutant/killer/fail_ques_spec.rb
|
415
400
|
- spec/unit/mutant/killer/rspec/class_methods/new_spec.rb
|
401
|
+
- spec/unit/mutant/killer/success_predicate_spec.rb
|
416
402
|
- spec/unit/mutant/loader/eval/class_methods/run_spec.rb
|
417
403
|
- spec/unit/mutant/matcher/chain/each_spec.rb
|
418
404
|
- spec/unit/mutant/matcher/chain/matchers_spec.rb
|
419
|
-
- spec/unit/mutant/matcher/class_methods/from_string_spec.rb
|
420
|
-
- spec/unit/mutant/matcher/class_methods/parse_spec.rb
|
421
405
|
- spec/unit/mutant/matcher/each_spec.rb
|
422
|
-
- spec/unit/mutant/matcher/method/
|
423
|
-
- spec/unit/mutant/matcher/method/
|
424
|
-
- spec/unit/mutant/matcher/
|
425
|
-
- spec/unit/mutant/matcher/
|
406
|
+
- spec/unit/mutant/matcher/method/instance/each_spec.rb
|
407
|
+
- spec/unit/mutant/matcher/method/singleton/each_spec.rb
|
408
|
+
- spec/unit/mutant/matcher/methods/instance/each_spec.rb
|
409
|
+
- spec/unit/mutant/matcher/methods/singleton/each_spec.rb
|
410
|
+
- spec/unit/mutant/matcher/namespace/each_spec.rb
|
426
411
|
- spec/unit/mutant/mutator/each_spec.rb
|
427
412
|
- spec/unit/mutant/mutator/emit_new_spec.rb
|
428
413
|
- spec/unit/mutant/mutator/emit_spec.rb
|
429
414
|
- spec/unit/mutant/mutator/node/assignment/mutation_spec.rb
|
415
|
+
- spec/unit/mutant/mutator/node/begin/mutation_spec.rb
|
430
416
|
- spec/unit/mutant/mutator/node/block/mutation_spec.rb
|
417
|
+
- spec/unit/mutant/mutator/node/case/mutation_spec.rb
|
431
418
|
- spec/unit/mutant/mutator/node/define/mutation_spec.rb
|
432
|
-
- spec/unit/mutant/mutator/node/
|
419
|
+
- spec/unit/mutant/mutator/node/if/mutation_spec.rb
|
433
420
|
- spec/unit/mutant/mutator/node/literal/array_spec.rb
|
434
421
|
- spec/unit/mutant/mutator/node/literal/boolean/mutation_spec.rb
|
435
422
|
- spec/unit/mutant/mutator/node/literal/empty_array_spec.rb
|
@@ -441,14 +428,19 @@ test_files:
|
|
441
428
|
- spec/unit/mutant/mutator/node/literal/regex_spec.rb
|
442
429
|
- spec/unit/mutant/mutator/node/literal/string_spec.rb
|
443
430
|
- spec/unit/mutant/mutator/node/literal/symbol_spec.rb
|
444
|
-
- spec/unit/mutant/mutator/node/receiver_case/mutation_spec.rb
|
445
431
|
- spec/unit/mutant/mutator/node/return/mutation_spec.rb
|
446
432
|
- spec/unit/mutant/mutator/node/send/mutation_spec.rb
|
447
433
|
- spec/unit/mutant/mutator/node/super/mutation_spec.rb
|
448
434
|
- spec/unit/mutant/mutator/node/while/mutation_spec.rb
|
449
435
|
- spec/unit/mutant/mutator/self_spec.rb
|
450
|
-
- spec/unit/mutant/
|
451
|
-
- spec/unit/mutant/
|
436
|
+
- spec/unit/mutant/runner/config/subjects_spec.rb
|
437
|
+
- spec/unit/mutant/runner/config/success_predicate_spec.rb
|
438
|
+
- spec/unit/mutant/runner/failed_predicte_spec.rb
|
439
|
+
- spec/unit/mutant/runner/mutation/killer_spec.rb
|
440
|
+
- spec/unit/mutant/runner/subject/success_predicate_spec.rb
|
441
|
+
- spec/unit/mutant/strategy/method_expansion/class_methods/run_spec.rb
|
442
|
+
- spec/unit/mutant/strategy/rspec/dm2/lookup/method/instance/spec_files_spec.rb
|
443
|
+
- spec/unit/mutant/strategy/rspec/dm2/lookup/method/singleton/spec_files_spec.rb
|
452
444
|
- spec/unit/mutant/subject/context_spec.rb
|
453
445
|
- spec/unit/mutant/subject/each_spec.rb
|
454
446
|
- spec/unit/mutant/subject/node_spec.rb
|
data/config/roodi.yml
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
---
|
2
|
-
AbcMetricMethodCheck:
|
3
|
-
score: 12.2
|
4
|
-
AssignmentInConditionalCheck: {}
|
5
|
-
CaseMissingElseCheck: {}
|
6
|
-
ClassLineCountCheck:
|
7
|
-
line_count: 324
|
8
|
-
ClassNameCheck:
|
9
|
-
pattern: !ruby/regexp /\A(?:[A-Z]+|[A-Z][a-z](?:[A-Z]?[a-z])+)\z/
|
10
|
-
ClassVariableCheck: {}
|
11
|
-
CyclomaticComplexityBlockCheck:
|
12
|
-
complexity: 2
|
13
|
-
CyclomaticComplexityMethodCheck:
|
14
|
-
complexity: 4
|
15
|
-
EmptyRescueBodyCheck: {}
|
16
|
-
ForLoopCheck: {}
|
17
|
-
MethodLineCountCheck:
|
18
|
-
line_count: 9
|
19
|
-
MethodNameCheck:
|
20
|
-
pattern: !ruby/regexp /\A(?:[a-z\d](?:_?[a-z\d])+[?!=]?|\[\]=?|==|<=>|<<|[+*&|-])\z/
|
21
|
-
ModuleLineCountCheck:
|
22
|
-
line_count: 327
|
23
|
-
ModuleNameCheck:
|
24
|
-
pattern: !ruby/regexp /\A(?:[A-Z]+|[A-Z][a-z](?:[A-Z]?[a-z])+)\z/
|
25
|
-
ParameterNumberCheck:
|
26
|
-
parameter_count: 3
|
@@ -1,141 +0,0 @@
|
|
1
|
-
module Mutant
|
2
|
-
class Matcher
|
3
|
-
class Method < self
|
4
|
-
# A classifier for input strings
|
5
|
-
class Classifier
|
6
|
-
include Adamantium::Flat
|
7
|
-
|
8
|
-
TABLE = {
|
9
|
-
'.' => Matcher::ScopeMethods::Singleton,
|
10
|
-
'#' => Matcher::ScopeMethods::Instance
|
11
|
-
}.freeze
|
12
|
-
|
13
|
-
SCOPE_FORMAT = /\A([^#.]+)(\.|#)(.+)\z/.freeze
|
14
|
-
|
15
|
-
# Positions of captured regexp groups
|
16
|
-
# Freezing fixnums to avoid their singleton classes are patched.
|
17
|
-
SCOPE_NAME_POSITION = 1.freeze
|
18
|
-
SCOPE_SYMBOL_POSITION = 2.freeze
|
19
|
-
METHOD_NAME_POSITION = 3.freeze
|
20
|
-
|
21
|
-
private_class_method :new
|
22
|
-
|
23
|
-
# Run classifier
|
24
|
-
#
|
25
|
-
# @param [String] input
|
26
|
-
#
|
27
|
-
# @return [Matcher::Method]
|
28
|
-
# returns matcher when input is in
|
29
|
-
#
|
30
|
-
# @return [nil]
|
31
|
-
# returns nil otherwise
|
32
|
-
#
|
33
|
-
# @api private
|
34
|
-
#
|
35
|
-
def self.run(input)
|
36
|
-
match = SCOPE_FORMAT.match(input)
|
37
|
-
return unless match
|
38
|
-
new(match).matcher
|
39
|
-
end
|
40
|
-
|
41
|
-
# Return method matcher
|
42
|
-
#
|
43
|
-
# @return [Matcher::Method]
|
44
|
-
#
|
45
|
-
# @api private
|
46
|
-
#
|
47
|
-
def matcher
|
48
|
-
scope_matcher.matcher.new(scope, method)
|
49
|
-
end
|
50
|
-
memoize :matcher
|
51
|
-
|
52
|
-
# Return method
|
53
|
-
#
|
54
|
-
# @return [Method, UnboundMethod]
|
55
|
-
#
|
56
|
-
# @api private
|
57
|
-
#
|
58
|
-
def method
|
59
|
-
scope_matcher.methods.detect do |method|
|
60
|
-
method.name == method_name
|
61
|
-
end || raise("Cannot find #{method_name} for #{scope}")
|
62
|
-
end
|
63
|
-
memoize :method, :freezer => :noop
|
64
|
-
|
65
|
-
# Return match
|
66
|
-
#
|
67
|
-
# @return [Matche]
|
68
|
-
#
|
69
|
-
# @api private
|
70
|
-
#
|
71
|
-
attr_reader :match
|
72
|
-
|
73
|
-
private
|
74
|
-
|
75
|
-
# Initialize matcher
|
76
|
-
#
|
77
|
-
# @param [MatchData] match
|
78
|
-
#
|
79
|
-
# @api private
|
80
|
-
#
|
81
|
-
def initialize(match)
|
82
|
-
@match = match
|
83
|
-
end
|
84
|
-
|
85
|
-
# Return scope
|
86
|
-
#
|
87
|
-
# @return [Class|Module]
|
88
|
-
#
|
89
|
-
# @api private
|
90
|
-
#
|
91
|
-
def scope
|
92
|
-
scope_name.gsub(%r(\A::), '').split('::').inject(::Object) do |parent, name|
|
93
|
-
parent.const_get(name)
|
94
|
-
end
|
95
|
-
end
|
96
|
-
memoize :scope
|
97
|
-
|
98
|
-
# Return scope name
|
99
|
-
#
|
100
|
-
# @return [String]
|
101
|
-
#
|
102
|
-
# @api private
|
103
|
-
#
|
104
|
-
def scope_name
|
105
|
-
match[SCOPE_NAME_POSITION]
|
106
|
-
end
|
107
|
-
|
108
|
-
# Return method name
|
109
|
-
#
|
110
|
-
# @return [String]
|
111
|
-
#
|
112
|
-
# @api private
|
113
|
-
#
|
114
|
-
def method_name
|
115
|
-
match[METHOD_NAME_POSITION].to_sym
|
116
|
-
end
|
117
|
-
|
118
|
-
# Return scope symbol
|
119
|
-
#
|
120
|
-
# @return [Symbol]
|
121
|
-
#
|
122
|
-
# @api private
|
123
|
-
#
|
124
|
-
def scope_symbol
|
125
|
-
match[SCOPE_SYMBOL_POSITION]
|
126
|
-
end
|
127
|
-
|
128
|
-
# Return matcher class
|
129
|
-
#
|
130
|
-
# @return [Class:Mutant::Matcher]
|
131
|
-
#
|
132
|
-
# @api private
|
133
|
-
#
|
134
|
-
def scope_matcher
|
135
|
-
TABLE.fetch(scope_symbol).new(scope)
|
136
|
-
end
|
137
|
-
memoize :scope_matcher
|
138
|
-
end
|
139
|
-
end
|
140
|
-
end
|
141
|
-
end
|