mutant 0.2.12 → 0.2.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/Changelog.md +4 -0
  2. data/Gemfile +1 -1
  3. data/Gemfile.devtools +39 -19
  4. data/README.md +3 -2
  5. data/TODO +3 -1
  6. data/config/flay.yml +1 -1
  7. data/config/site.reek +10 -3
  8. data/lib/mutant.rb +6 -73
  9. data/lib/mutant/constants.rb +49 -0
  10. data/lib/mutant/killer/forking.rb +6 -2
  11. data/lib/mutant/loader.rb +6 -79
  12. data/lib/mutant/matcher/scope_methods.rb +2 -2
  13. data/lib/mutant/mutation.rb +3 -2
  14. data/lib/mutant/mutation/filter/whitelist.rb +2 -0
  15. data/lib/mutant/mutator/node.rb +20 -9
  16. data/lib/mutant/mutator/node/assignment.rb +8 -1
  17. data/lib/mutant/mutator/node/block.rb +1 -0
  18. data/lib/mutant/mutator/node/default_arguments.rb +1 -0
  19. data/lib/mutant/mutator/node/formal_arguments_19.rb +1 -0
  20. data/lib/mutant/mutator/node/formal_arguments_19/default_mutations.rb +1 -0
  21. data/lib/mutant/mutator/node/{if_statement.rb → if.rb} +21 -6
  22. data/lib/mutant/mutator/node/iter_19.rb +1 -0
  23. data/lib/mutant/mutator/node/literal.rb +4 -3
  24. data/lib/mutant/mutator/node/literal/hash.rb +2 -1
  25. data/lib/mutant/mutator/node/literal/range.rb +2 -1
  26. data/lib/mutant/mutator/node/noop.rb +2 -0
  27. data/lib/mutant/mutator/node/receiver_case.rb +1 -19
  28. data/lib/mutant/mutator/node/send.rb +8 -136
  29. data/lib/mutant/mutator/node/send/binary_operator_method.rb +61 -0
  30. data/lib/mutant/mutator/node/send/with_arguments.rb +81 -0
  31. data/lib/mutant/mutator/node/super.rb +2 -0
  32. data/lib/mutant/mutator/node/{arguments.rb → when.rb} +4 -4
  33. data/lib/mutant/mutator/node/while.rb +2 -0
  34. data/lib/mutant/mutator/util/array.rb +2 -1
  35. data/lib/mutant/mutator/util/symbol.rb +1 -1
  36. data/lib/mutant/reporter/null.rb +1 -0
  37. data/lib/mutant/runner.rb +3 -4
  38. data/lib/mutant/singleton_methods.rb +28 -0
  39. data/lib/mutant/strategy.rb +2 -0
  40. data/lib/mutant/strategy/rspec/example_lookup.rb +4 -2
  41. data/mutant.gemspec +4 -4
  42. data/spec/shared/mutator_behavior.rb +1 -2
  43. data/spec/support/zombie.rb +35 -2
  44. data/spec/unit/mutant/loader/eval/class_methods/run_spec.rb +5 -6
  45. data/spec/unit/mutant/mutator/node/literal/float_spec.rb +1 -1
  46. data/spec/unit/mutant/mutator/node/send/mutation_spec.rb +61 -61
  47. metadata +12 -10
  48. data/spec/unit/mutant/loader/rubinius/class_methods/run_spec.rb +0 -42
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.2.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-03 00:00:00.000000000 Z
12
+ date: 2013-01-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: to_source
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 0.2.8
21
+ version: 0.2.13
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 0.2.8
29
+ version: 0.2.13
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: ice_nine
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -155,7 +155,7 @@ dependencies:
155
155
  - - ~>
156
156
  - !ruby/object:Gem::Version
157
157
  version: 1.1.3
158
- description: Mutation testing for ruby under rubinius
158
+ description: Mutation testing for ruby
159
159
  email:
160
160
  - mbj@seonic.net
161
161
  executables:
@@ -186,6 +186,7 @@ files:
186
186
  - lib/mutant.rb
187
187
  - lib/mutant/cli.rb
188
188
  - lib/mutant/color.rb
189
+ - lib/mutant/constants.rb
189
190
  - lib/mutant/context.rb
190
191
  - lib/mutant/context/scope.rb
191
192
  - lib/mutant/differ.rb
@@ -211,7 +212,6 @@ files:
211
212
  - lib/mutant/mutator.rb
212
213
  - lib/mutant/mutator/node.rb
213
214
  - lib/mutant/mutator/node/actual_arguments.rb
214
- - lib/mutant/mutator/node/arguments.rb
215
215
  - lib/mutant/mutator/node/assignment.rb
216
216
  - lib/mutant/mutator/node/block.rb
217
217
  - lib/mutant/mutator/node/default_arguments.rb
@@ -220,7 +220,7 @@ files:
220
220
  - lib/mutant/mutator/node/formal_arguments_19/default_mutations.rb
221
221
  - lib/mutant/mutator/node/formal_arguments_19/pattern_argument_expansion.rb
222
222
  - lib/mutant/mutator/node/formal_arguments_19/require_defaults.rb
223
- - lib/mutant/mutator/node/if_statement.rb
223
+ - lib/mutant/mutator/node/if.rb
224
224
  - lib/mutant/mutator/node/iter_19.rb
225
225
  - lib/mutant/mutator/node/literal.rb
226
226
  - lib/mutant/mutator/node/literal/array.rb
@@ -241,7 +241,10 @@ files:
241
241
  - lib/mutant/mutator/node/receiver_case.rb
242
242
  - lib/mutant/mutator/node/return.rb
243
243
  - lib/mutant/mutator/node/send.rb
244
+ - lib/mutant/mutator/node/send/binary_operator_method.rb
245
+ - lib/mutant/mutator/node/send/with_arguments.rb
244
246
  - lib/mutant/mutator/node/super.rb
247
+ - lib/mutant/mutator/node/when.rb
245
248
  - lib/mutant/mutator/node/while.rb
246
249
  - lib/mutant/mutator/registry.rb
247
250
  - lib/mutant/mutator/util.rb
@@ -253,6 +256,7 @@ files:
253
256
  - lib/mutant/reporter/null.rb
254
257
  - lib/mutant/reporter/stats.rb
255
258
  - lib/mutant/runner.rb
259
+ - lib/mutant/singleton_methods.rb
256
260
  - lib/mutant/strategy.rb
257
261
  - lib/mutant/strategy/rspec.rb
258
262
  - lib/mutant/strategy/rspec/example_lookup.rb
@@ -285,7 +289,6 @@ files:
285
289
  - spec/unit/mutant/killer/fail_ques_spec.rb
286
290
  - spec/unit/mutant/killer/rspec/class_methods/new_spec.rb
287
291
  - spec/unit/mutant/loader/eval/class_methods/run_spec.rb
288
- - spec/unit/mutant/loader/rubinius/class_methods/run_spec.rb
289
292
  - spec/unit/mutant/matcher/chain/each_spec.rb
290
293
  - spec/unit/mutant/matcher/chain/matchers_spec.rb
291
294
  - spec/unit/mutant/matcher/class_methods/from_string_spec.rb
@@ -371,7 +374,7 @@ rubyforge_project:
371
374
  rubygems_version: 1.8.23
372
375
  signing_key:
373
376
  specification_version: 3
374
- summary: Mutation testing for ruby under rubinius
377
+ summary: Mutation testing tool for ruby under MRI and Rubinius
375
378
  test_files:
376
379
  - spec/integration/mutant/differ_spec.rb
377
380
  - spec/integration/mutant/method_matching_spec.rb
@@ -399,7 +402,6 @@ test_files:
399
402
  - spec/unit/mutant/killer/fail_ques_spec.rb
400
403
  - spec/unit/mutant/killer/rspec/class_methods/new_spec.rb
401
404
  - spec/unit/mutant/loader/eval/class_methods/run_spec.rb
402
- - spec/unit/mutant/loader/rubinius/class_methods/run_spec.rb
403
405
  - spec/unit/mutant/matcher/chain/each_spec.rb
404
406
  - spec/unit/mutant/matcher/chain/matchers_spec.rb
405
407
  - spec/unit/mutant/matcher/class_methods/from_string_spec.rb
@@ -1,42 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Mutant::Loader::Rubinius, '.run' do
4
- before do
5
- pending
6
- end
7
-
8
- subject { object.run(node) }
9
-
10
- let(:object) { described_class }
11
-
12
- after do
13
- Object.send(:remove_const, :SomeNamespace)
14
- end
15
-
16
- let(:source) do
17
- # This test case will blow up when not executed
18
- # under toplevel binding.
19
- <<-RUBY
20
- class SomeNamespace
21
- class Bar
22
- end
23
-
24
- class SomeOther
25
- class Foo < Bar
26
- end
27
- end
28
- end
29
- RUBY
30
- end
31
-
32
- let(:node) do
33
- Rubinius::AST::Script.new(source.to_ast).tap do |source|
34
- source.file = "/some/source"
35
- end
36
- end
37
-
38
- it 'should load nodes into vm' do
39
- subject
40
- SomeNamespace::SomeOther::Foo
41
- end
42
- end