mutant 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -2
  3. data/Changelog.md +6 -0
  4. data/Gemfile.devtools +1 -1
  5. data/bin/mutant +2 -1
  6. data/config/flay.yml +1 -1
  7. data/config/reek.yml +3 -0
  8. data/lib/mutant.rb +5 -3
  9. data/lib/mutant/cli.rb +2 -2
  10. data/lib/mutant/config.rb +1 -1
  11. data/lib/mutant/diff.rb +1 -1
  12. data/lib/mutant/env.rb +1 -1
  13. data/lib/mutant/expression/methods.rb +16 -0
  14. data/lib/mutant/isolation.rb +16 -2
  15. data/lib/mutant/mutator/node/const.rb +1 -1
  16. data/lib/mutant/mutator/node/generic.rb +1 -1
  17. data/lib/mutant/mutator/registry.rb +1 -1
  18. data/lib/mutant/reporter/cli.rb +1 -1
  19. data/lib/mutant/reporter/cli/format.rb +0 -12
  20. data/lib/mutant/reporter/cli/printer.rb +1 -1
  21. data/lib/mutant/result.rb +1 -1
  22. data/lib/mutant/runner.rb +50 -29
  23. data/lib/mutant/runner/collector.rb +10 -11
  24. data/lib/mutant/subject.rb +1 -4
  25. data/lib/mutant/subject/method.rb +11 -0
  26. data/lib/mutant/version.rb +1 -1
  27. data/meta/send.rb +13 -0
  28. data/mutant.gemspec +2 -2
  29. data/spec/spec_helper.rb +2 -9
  30. data/spec/support/corpus.rb +5 -5
  31. data/spec/support/rb_bug.rb +18 -0
  32. data/spec/unit/mutant/cli_spec.rb +2 -2
  33. data/spec/unit/mutant/expression/methods_spec.rb +7 -1
  34. data/spec/unit/mutant/isolation_spec.rb +22 -2
  35. data/spec/unit/mutant/matcher/method/instance_spec.rb +5 -5
  36. data/spec/unit/mutant/matcher/method/singleton_spec.rb +5 -5
  37. data/spec/unit/mutant/reporter/cli_spec.rb +13 -14
  38. data/spec/unit/mutant/runner/collector_spec.rb +198 -0
  39. data/spec/unit/mutant/runner_spec.rb +2 -3
  40. data/spec/unit/mutant/subject/method/instance_spec.rb +8 -0
  41. data/spec/unit/mutant/subject/method/singleton_spec.rb +8 -0
  42. data/spec/unit/mutant/warning_filter_spec.rb +1 -1
  43. data/test_app/Gemfile.devtools +1 -1
  44. data/test_app/lib/test_app.rb +4 -0
  45. metadata +22 -19
  46. data/lib/parser_extensions.rb +0 -25
@@ -95,12 +95,11 @@ RSpec.describe Mutant::Runner do
95
95
  Mutant::Result::Env.new(
96
96
  env: env,
97
97
  runtime: 0.0,
98
- done: false,
99
98
  subject_results: expected_subject_results
100
99
  )
101
100
  end
102
101
 
103
- pending 'on normal execution' do
102
+ context 'on error free execution' do
104
103
  subject { object.result }
105
104
 
106
105
  its(:env) { should be(env) }
@@ -110,7 +109,7 @@ RSpec.describe Mutant::Runner do
110
109
  end
111
110
  end
112
111
 
113
- skip 'when isolation raises error' do
112
+ context 'when isolation raises error' do
114
113
  subject { object.result }
115
114
 
116
115
  its(:env) { should be(env) }
@@ -32,6 +32,14 @@ RSpec.describe Mutant::Subject::Method::Instance do
32
32
  it_should_behave_like 'an idempotent method'
33
33
  end
34
34
 
35
+ describe '#match_expression' do
36
+ subject { object.match_expressions }
37
+
38
+ it { should eql(%w[Test#foo Test*].map(&Mutant::Expression.method(:parse))) }
39
+
40
+ it_should_behave_like 'an idempotent method'
41
+ end
42
+
35
43
  describe '#prepare' do
36
44
 
37
45
  let(:context) do
@@ -27,6 +27,14 @@ RSpec.describe Mutant::Subject::Method::Singleton do
27
27
  it_should_behave_like 'an idempotent method'
28
28
  end
29
29
 
30
+ describe '#match_expression' do
31
+ subject { object.match_expressions }
32
+
33
+ it { should eql(%w[Test.foo Test*].map(&Mutant::Expression.method(:parse))) }
34
+
35
+ it_should_behave_like 'an idempotent method'
36
+ end
37
+
30
38
  describe '#prepare' do
31
39
 
32
40
  subject { object.prepare }
@@ -54,7 +54,7 @@ RSpec.describe Mutant::WarningFilter do
54
54
  it 'executes block with warning filter enabled' do
55
55
  found = false
56
56
  object.use do
57
- found = $stderr.kind_of?(described_class)
57
+ found = $stderr.is_a?(described_class)
58
58
  end
59
59
  expect(found).to be(true)
60
60
  end
@@ -38,7 +38,7 @@ group :metrics do
38
38
  gem 'flay', '~> 2.5.0'
39
39
  gem 'flog', '~> 4.2.1'
40
40
  gem 'reek', '~> 1.3.7'
41
- gem 'rubocop', '~> 0.23.0'
41
+ gem 'rubocop', '~> 0.26.1'
42
42
  gem 'simplecov', '~> 0.7.1'
43
43
  gem 'yardstick', '~> 0.9.9'
44
44
 
@@ -1,6 +1,9 @@
1
1
  # encoding: utf-8
2
2
 
3
+ original = $VERBOSE
3
4
  # Namespace for test application
5
+ # Silence intentional violations
6
+ $VERBOSE = false
4
7
  module TestApp
5
8
  module InstanceMethodTests
6
9
  module DefinedOnce
@@ -99,3 +102,4 @@ module TestApp
99
102
  end
100
103
 
101
104
  require 'test_app/literal'
105
+ $VERBOSE = original
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
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-09-22 00:00:00.000000000 Z
11
+ date: 2014-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.1.14
117
+ version: 0.1.15
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
- version: 0.1.14
124
+ version: 0.1.15
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: ice_nine
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -178,20 +178,6 @@ dependencies:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
180
  version: 0.0.9
181
- - !ruby/object:Gem::Dependency
182
- name: inflecto
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - "~>"
186
- - !ruby/object:Gem::Version
187
- version: 0.0.2
188
- type: :runtime
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - "~>"
193
- - !ruby/object:Gem::Version
194
- version: 0.0.2
195
181
  - !ruby/object:Gem::Dependency
196
182
  name: anima
197
183
  requirement: !ruby/object:Gem::Requirement
@@ -240,6 +226,20 @@ dependencies:
240
226
  - - ">="
241
227
  - !ruby/object:Gem::Version
242
228
  version: 1.3.5
229
+ - !ruby/object:Gem::Dependency
230
+ name: ffi
231
+ requirement: !ruby/object:Gem::Requirement
232
+ requirements:
233
+ - - "~>"
234
+ - !ruby/object:Gem::Version
235
+ version: 1.9.6
236
+ type: :development
237
+ prerelease: false
238
+ version_requirements: !ruby/object:Gem::Requirement
239
+ requirements:
240
+ - - "~>"
241
+ - !ruby/object:Gem::Version
242
+ version: 1.9.6
243
243
  description: Mutation testing for ruby
244
244
  email:
245
245
  - mbj@schirp-dso.com
@@ -393,7 +393,6 @@ files:
393
393
  - lib/mutant/warning_filter.rb
394
394
  - lib/mutant/zombifier.rb
395
395
  - lib/mutant/zombifier/file.rb
396
- - lib/parser_extensions.rb
397
396
  - meta/and.rb
398
397
  - meta/and_asgn.rb
399
398
  - meta/array.rb
@@ -463,6 +462,7 @@ files:
463
462
  - spec/support/corpus.rb
464
463
  - spec/support/ice_nine_config.rb
465
464
  - spec/support/mutation_verifier.rb
465
+ - spec/support/rb_bug.rb
466
466
  - spec/support/rspec.rb
467
467
  - spec/support/test_app.rb
468
468
  - spec/unit/mutant/ast_spec.rb
@@ -494,6 +494,7 @@ files:
494
494
  - spec/unit/mutant/reporter/cli_spec.rb
495
495
  - spec/unit/mutant/reporter/null_spec.rb
496
496
  - spec/unit/mutant/require_highjack_spec.rb
497
+ - spec/unit/mutant/runner/collector_spec.rb
497
498
  - spec/unit/mutant/runner_spec.rb
498
499
  - spec/unit/mutant/subject/context_spec.rb
499
500
  - spec/unit/mutant/subject/method/instance_spec.rb
@@ -571,6 +572,7 @@ test_files:
571
572
  - spec/unit/mutant/reporter/cli_spec.rb
572
573
  - spec/unit/mutant/reporter/null_spec.rb
573
574
  - spec/unit/mutant/require_highjack_spec.rb
575
+ - spec/unit/mutant/runner/collector_spec.rb
574
576
  - spec/unit/mutant/runner_spec.rb
575
577
  - spec/unit/mutant/subject/context_spec.rb
576
578
  - spec/unit/mutant/subject/method/instance_spec.rb
@@ -580,3 +582,4 @@ test_files:
580
582
  - spec/unit/mutant/warning_expectation.rb
581
583
  - spec/unit/mutant/warning_filter_spec.rb
582
584
  - spec/unit/mutant_spec.rb
585
+ has_rdoc:
@@ -1,25 +0,0 @@
1
- # Monkeypatch to silence warnings in parser
2
- #
3
- # Will be removed once https://github.com/whitequark/parser/issues/145 is solved.
4
-
5
- # Parser namespace
6
- module Parser
7
- # Monkeypatched lexer
8
- class Lexer
9
-
10
- # Return new lexer
11
- #
12
- # @return [Lexer]
13
- #
14
- # @api private
15
- #
16
- def self.new(*arguments)
17
- super.tap do |instance|
18
- instance.instance_eval do
19
- @force_utf32 = false
20
- end
21
- end
22
- end
23
-
24
- end # Lexer
25
- end # Parser