mutant 0.5.11 → 0.5.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/Changelog.md +7 -1
- data/README.md +29 -12
- data/Rakefile +12 -0
- data/config/flay.yml +1 -1
- data/config/flog.yml +1 -1
- data/config/mutant.yml +1 -1
- data/lib/mutant/mutator/node/literal/nil.rb +0 -1
- data/lib/mutant/version.rb +1 -1
- data/spec/unit/mutant/mutator/node/literal/nil_spec.rb +2 -2
- data/spec/unit/mutant/mutator/node/named_value/access_spec.rb +0 -4
- data/spec/unit/mutant/mutator/node/send_spec.rb +0 -5
- metadata +42 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 297b2cebef213ce23d17e2ab0c3d27077863d433
|
4
|
+
data.tar.gz: f31250e07dc3d7702c4d43b5428fc54e9b076c36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afddc1bb04782a26096e271114d2e3142c24bb68bf49fcd610614ecca0c395956925351eb8e88b0c5d35f6fc2640b8331a41364ae028785475fbcf36cdd5a011
|
7
|
+
data.tar.gz: 527d4038e21573b97c1fff670cca72e79724c69e2b720352df9d9e8a236ccd742b51d0757b817d963911b7cdadbcbe680d4fc8347fed5802c49fb6f3b69b9b94
|
data/.travis.yml
CHANGED
data/Changelog.md
CHANGED
data/README.md
CHANGED
@@ -11,8 +11,6 @@ Mutant is a mutation testing tool for ruby.
|
|
11
11
|
The idea is that if code can be changed and your tests do not notice, either that code isn't being covered
|
12
12
|
or it does not have a speced side effect.
|
13
13
|
|
14
|
-
A more readable introduction can be found under: http://solnic.eu/2013/01/23/mutation-testing-with-mutant.html
|
15
|
-
|
16
14
|
Mutant supports MRI and RBX 1.9 and 2.0, while support for jruby is planned.
|
17
15
|
It should also work under any ruby engine that supports POSIX-fork(2) semantics.
|
18
16
|
Support for MRI 2.1 is unstable, because this MRI release segfaults on basic metaprogramming mutants dependencies do.
|
@@ -20,6 +18,24 @@ Support for MRI 2.1 is unstable, because this MRI release segfaults on basic met
|
|
20
18
|
Mutant uses a pure ruby [parser](https://github.com/whitequark/parser) and an [unparser](https://github.com/mbj/unparser)
|
21
19
|
to do its magic.
|
22
20
|
|
21
|
+
Mutant does not have really good "getting started" documentation currently so please refer to presentations and blog posts below.
|
22
|
+
|
23
|
+
Presentations
|
24
|
+
-------------
|
25
|
+
|
26
|
+
There are some presentations about mutant in the wild:
|
27
|
+
|
28
|
+
* [RailsConf 2014](http://railsconf.com/) / http://confreaks.com/videos/3333-railsconf-mutation-testing-with-mutant
|
29
|
+
* [Wrocloverb 2014](http://wrocloverb.com/) / https://www.youtube.com/watch?v=rz-lFKEioLk
|
30
|
+
* [Eurocamp-2013](http://2013.eurucamp.org/) / FrOSCon-2013 http://slid.es/markusschirp/mutation-testing
|
31
|
+
* [Cologne.rb](http://www.colognerb.de/topics/mutation-testing-mit-mutant) / https://github.com/DonSchado/colognerb-on-mutant/blob/master/mutation_testing_slides.pdf
|
32
|
+
|
33
|
+
Blog-Posts
|
34
|
+
----------
|
35
|
+
|
36
|
+
* http://www.sitepoint.com/mutation-testing-mutant/
|
37
|
+
* http://solnic.eu/2013/01/23/mutation-testing-with-mutant.html
|
38
|
+
|
23
39
|
Integrations
|
24
40
|
------------
|
25
41
|
|
@@ -108,16 +124,8 @@ mutant --include lib --require virtus --use rspec ::Virtus::Attribute.build
|
|
108
124
|
mutant --include lib --require virtus --use rspec ::Virtus::Attribute#type
|
109
125
|
```
|
110
126
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
There are some presentations about mutant in the wild:
|
115
|
-
|
116
|
-
* [Eurocamp-2013](http://2013.eurucamp.org/) / FrOSCon-2013 http://slid.es/markusschirp/mutation-testing
|
117
|
-
* [Cologne.rb](http://www.colognerb.de/topics/mutation-testing-mit-mutant) https://github.com/DonSchado/colognerb-on-mutant/blob/master/mutation_testing_slides.pdf
|
118
|
-
|
119
|
-
Subjects:
|
120
|
-
---------
|
127
|
+
Subjects
|
128
|
+
--------
|
121
129
|
|
122
130
|
Mutant currently mutates code in instance and singleton methods. It is planned to support mutation
|
123
131
|
of constant definitions and domain specific languages, DSL probably as plugins.
|
@@ -137,6 +145,15 @@ current prefix level, these example groups *must* kill the mutation.
|
|
137
145
|
This test selection strategy is compatible with the old `--rspec-dm2` and `--rspec-unit` strategy.
|
138
146
|
The old flags were removed. It allows to define very fine grained specs, or coarse grained - as you like.
|
139
147
|
|
148
|
+
Donations
|
149
|
+
---------
|
150
|
+
|
151
|
+
I ([mbj](https://github.com/mbj)) build this and adjacent tools in my free time.
|
152
|
+
There already whent LOTS of into it and there is still a lot to do.
|
153
|
+
|
154
|
+
You might consider to donate. I have a [gittip](https://gittip.com/mbj) account.
|
155
|
+
Also I'm looking for sponsors. Email me if you are interested.
|
156
|
+
|
140
157
|
Support
|
141
158
|
-------
|
142
159
|
|
data/Rakefile
CHANGED
@@ -3,3 +3,15 @@
|
|
3
3
|
require 'devtools'
|
4
4
|
|
5
5
|
Devtools.init_rake_tasks
|
6
|
+
|
7
|
+
# Mutant self test is to slow for travis. Fast enough for circle.
|
8
|
+
if ENV['TRAVIS']
|
9
|
+
Rake.application.load_imports
|
10
|
+
|
11
|
+
task('metrics:mutant').clear
|
12
|
+
namespace :metrics do
|
13
|
+
task :mutant => :coverage do
|
14
|
+
$stderr.puts 'Mutant self test via zombie not active on travis CI'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/config/flay.yml
CHANGED
data/config/flog.yml
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
---
|
2
|
-
threshold:
|
2
|
+
threshold: 29.3
|
data/config/mutant.yml
CHANGED
data/lib/mutant/version.rb
CHANGED
@@ -15,7 +15,6 @@ describe Mutant::Mutator::Node::NamedValue::Access, 'mutations' do
|
|
15
15
|
mutants << '$a = nil; nil'
|
16
16
|
mutants << '$a = nil'
|
17
17
|
mutants << '$a'
|
18
|
-
mutants << '$a = ::Object.new; $a'
|
19
18
|
mutants << '$srandom = nil; $a'
|
20
19
|
mutants << 'nil; $a'
|
21
20
|
end
|
@@ -31,7 +30,6 @@ describe Mutant::Mutator::Node::NamedValue::Access, 'mutations' do
|
|
31
30
|
mutants << '@@a = nil; nil'
|
32
31
|
mutants << '@@a = nil'
|
33
32
|
mutants << '@@a'
|
34
|
-
mutants << '@@a = ::Object.new; @@a'
|
35
33
|
mutants << '@@srandom = nil; @@a'
|
36
34
|
mutants << 'nil; @@a'
|
37
35
|
end
|
@@ -45,7 +43,6 @@ describe Mutant::Mutator::Node::NamedValue::Access, 'mutations' do
|
|
45
43
|
mutants << '@a = nil; nil'
|
46
44
|
mutants << '@a = nil'
|
47
45
|
mutants << '@a'
|
48
|
-
mutants << '@a = ::Object.new; @a'
|
49
46
|
mutants << '@srandom = nil; @a'
|
50
47
|
mutants << 'nil; @a'
|
51
48
|
end
|
@@ -60,7 +57,6 @@ describe Mutant::Mutator::Node::NamedValue::Access, 'mutations' do
|
|
60
57
|
mutants = []
|
61
58
|
mutants << 'a = nil; nil'
|
62
59
|
mutants << 'a = nil'
|
63
|
-
mutants << 'a = ::Object.new; a'
|
64
60
|
# TODO: fix invalid AST
|
65
61
|
# These ASTs are not valid and should NOT be emitted
|
66
62
|
# Mutations of lvarasgn need to be special cased to avoid this.
|
@@ -237,7 +237,6 @@ describe Mutant::Mutator, 'send' do
|
|
237
237
|
mutations = []
|
238
238
|
mutations << 'foo'
|
239
239
|
mutations << 'nil'
|
240
|
-
mutations << 'foo(::Object.new)'
|
241
240
|
end
|
242
241
|
|
243
242
|
it_should_behave_like 'a mutator'
|
@@ -252,7 +251,6 @@ describe Mutant::Mutator, 'send' do
|
|
252
251
|
mutations << 'self.foo'
|
253
252
|
mutations << 'foo(nil)'
|
254
253
|
mutations << 'nil'
|
255
|
-
mutations << 'self.foo(::Object.new)'
|
256
254
|
mutations << 'nil.foo(nil)'
|
257
255
|
end
|
258
256
|
|
@@ -268,7 +266,6 @@ describe Mutant::Mutator, 'send' do
|
|
268
266
|
mutations = []
|
269
267
|
mutations << "foo.#{keyword}"
|
270
268
|
mutations << 'foo'
|
271
|
-
mutations << "foo.#{keyword}(::Object.new)"
|
272
269
|
mutations << "nil.#{keyword}(nil)"
|
273
270
|
mutations << 'nil'
|
274
271
|
end
|
@@ -285,8 +282,6 @@ describe Mutant::Mutator, 'send' do
|
|
285
282
|
mutations = []
|
286
283
|
mutations << 'foo()'
|
287
284
|
mutations << 'foo(nil)'
|
288
|
-
mutations << 'foo(::Object.new, nil)'
|
289
|
-
mutations << 'foo(nil, ::Object.new)'
|
290
285
|
mutations << 'nil'
|
291
286
|
end
|
292
287
|
|
metadata
CHANGED
@@ -1,229 +1,229 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mutant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ast
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '2.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: diff-lcs
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.2'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: morpher
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 0.2.3
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.2.3
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: procto
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 0.0.2
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.0.2
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: abstract_type
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 0.0.7
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ~>
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.0.7
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: unparser
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - ~>
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 0.1.12
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - ~>
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 0.1.12
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: ice_nine
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - ~>
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: 0.11.0
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - ~>
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 0.11.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: adamantium
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - ~>
|
129
|
+
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: 0.2.0
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - ~>
|
136
|
+
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: 0.2.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: memoizable
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- - ~>
|
143
|
+
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: 0.4.2
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- - ~>
|
150
|
+
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 0.4.2
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: equalizer
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- - ~>
|
157
|
+
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: 0.0.9
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- - ~>
|
164
|
+
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: 0.0.9
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: inflecto
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
|
-
- - ~>
|
171
|
+
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
173
|
version: 0.0.2
|
174
174
|
type: :runtime
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- - ~>
|
178
|
+
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: 0.0.2
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: anima
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- - ~>
|
185
|
+
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
187
|
version: 0.2.0
|
188
188
|
type: :runtime
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- - ~>
|
192
|
+
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: 0.2.0
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: concord
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
|
-
- - ~>
|
199
|
+
- - "~>"
|
200
200
|
- !ruby/object:Gem::Version
|
201
201
|
version: 0.1.5
|
202
202
|
type: :runtime
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
|
-
- - ~>
|
206
|
+
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: 0.1.5
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: bundler
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
|
-
- - ~>
|
213
|
+
- - "~>"
|
214
214
|
- !ruby/object:Gem::Version
|
215
215
|
version: '1.3'
|
216
|
-
- -
|
216
|
+
- - ">="
|
217
217
|
- !ruby/object:Gem::Version
|
218
218
|
version: 1.3.5
|
219
219
|
type: :development
|
220
220
|
prerelease: false
|
221
221
|
version_requirements: !ruby/object:Gem::Requirement
|
222
222
|
requirements:
|
223
|
-
- - ~>
|
223
|
+
- - "~>"
|
224
224
|
- !ruby/object:Gem::Version
|
225
225
|
version: '1.3'
|
226
|
-
- -
|
226
|
+
- - ">="
|
227
227
|
- !ruby/object:Gem::Version
|
228
228
|
version: 1.3.5
|
229
229
|
description: Mutation testing for ruby
|
@@ -236,11 +236,11 @@ extra_rdoc_files:
|
|
236
236
|
- TODO
|
237
237
|
- LICENSE
|
238
238
|
files:
|
239
|
-
- .gitignore
|
240
|
-
- .rspec
|
241
|
-
- .rubocop.yml
|
242
|
-
- .ruby-gemset
|
243
|
-
- .travis.yml
|
239
|
+
- ".gitignore"
|
240
|
+
- ".rspec"
|
241
|
+
- ".rubocop.yml"
|
242
|
+
- ".ruby-gemset"
|
243
|
+
- ".travis.yml"
|
244
244
|
- Changelog.md
|
245
245
|
- Gemfile
|
246
246
|
- Gemfile.devtools
|
@@ -494,17 +494,17 @@ require_paths:
|
|
494
494
|
- lib
|
495
495
|
required_ruby_version: !ruby/object:Gem::Requirement
|
496
496
|
requirements:
|
497
|
-
- -
|
497
|
+
- - ">="
|
498
498
|
- !ruby/object:Gem::Version
|
499
499
|
version: 1.9.3
|
500
500
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
501
501
|
requirements:
|
502
|
-
- -
|
502
|
+
- - ">="
|
503
503
|
- !ruby/object:Gem::Version
|
504
504
|
version: '0'
|
505
505
|
requirements: []
|
506
506
|
rubyforge_project:
|
507
|
-
rubygems_version: 2.
|
507
|
+
rubygems_version: 2.2.2
|
508
508
|
signing_key:
|
509
509
|
specification_version: 4
|
510
510
|
summary: Mutation testing tool for ruby under MRI and Rubinius
|