mutant-rspec 0.7.1 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/TODO +0 -8
- data/lib/mutant/integration/rspec.rb +9 -6
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 841d8437d6b4e83a2853b998bc7865fb71865e04
|
4
|
+
data.tar.gz: ece85179c34925c4e2c346bb570e81bac0c5cb9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd150374986f0a819dea38b55d0ba0971dff0024cb6653de0fd659afc3ea838d6d9f6ec9fbeae2dce6dcfb6eae0f32e1fbdf713fcfa181f03031d6aa5c7f25cd
|
7
|
+
data.tar.gz: a37695e9f5ad5de2a05aac361bc7dbdbe35bf96318b9597cd28fa8e33a70ee6fb3a5b791e97a859aa9b1b4428f8e366355d4197085cd102988fb46fff2cf7411
|
data/TODO
CHANGED
@@ -1,23 +1,15 @@
|
|
1
1
|
Code:
|
2
2
|
* Test mutant with dynamically created zombie.
|
3
|
-
* Log all warnings through reporter, so remove random $stderr.puts calls
|
4
3
|
|
5
4
|
Mutations:
|
6
5
|
* Add true masgn mutations
|
7
|
-
* Add binary operator specific mutations (YAY, finally reached this point)
|
8
6
|
* Add some kind of a "do not touch me object" that raises on all messages.
|
9
7
|
It can be used to make sure each literal value is touched.
|
10
8
|
* Replace nil or add "do not touch me object" to literal mutations.
|
11
9
|
* Mutate options on Regexp literals
|
12
10
|
* Add mutations for dynamic regexp symbol and string literals
|
13
|
-
* Mutate Block catch "def foo(&block)" and block pass "foo(&block)"
|
14
|
-
* Binary operator mutations
|
15
11
|
* Add timeout to terminate infinite loops
|
16
12
|
|
17
|
-
Example of a negative mutation:
|
18
|
-
Mutations on local variables and arguments prefixed with an underscore would be emitted as
|
19
|
-
negative mutations that must be alive.
|
20
|
-
|
21
13
|
Loader:
|
22
14
|
* Make sure loader does not change visibility of injected mutants
|
23
15
|
|
@@ -81,28 +81,29 @@ module Mutant
|
|
81
81
|
# @api private
|
82
82
|
#
|
83
83
|
def all_tests_index
|
84
|
-
all_examples.each_with_object({}) do |example, index|
|
85
|
-
index[parse_example(example)] = example
|
84
|
+
all_examples.each_with_index.each_with_object({}) do |(example, example_index), index|
|
85
|
+
index[parse_example(example, example_index)] = example
|
86
86
|
end
|
87
87
|
end
|
88
88
|
memoize :all_tests_index
|
89
89
|
|
90
90
|
# Parse example into test
|
91
91
|
#
|
92
|
-
# @param [RSpec::Core::Example]
|
92
|
+
# @param [RSpec::Core::Example] example
|
93
|
+
# @param [Fixnum] index
|
93
94
|
#
|
94
95
|
# @return [Test]
|
95
96
|
#
|
96
97
|
# @api private
|
97
98
|
#
|
98
|
-
def parse_example(example)
|
99
|
+
def parse_example(example, index)
|
99
100
|
metadata = example.metadata
|
100
101
|
location = metadata.fetch(:location)
|
101
102
|
full_description = metadata.fetch(:full_description)
|
102
103
|
expression = Expression.try_parse(full_description.split(EXPRESSION_DELIMITER, 2).first) || ALL
|
103
104
|
|
104
105
|
Test.new(
|
105
|
-
id: "rspec:#{location}
|
106
|
+
id: "rspec:#{index}:#{location}/#{full_description}",
|
106
107
|
expression: expression
|
107
108
|
)
|
108
109
|
end
|
@@ -114,7 +115,9 @@ module Mutant
|
|
114
115
|
# @api private
|
115
116
|
#
|
116
117
|
def all_examples
|
117
|
-
@world.example_groups.flat_map(&:descendants).flat_map(&:examples)
|
118
|
+
@world.example_groups.flat_map(&:descendants).flat_map(&:examples).select do |example|
|
119
|
+
example.metadata.fetch(:mutant, true)
|
120
|
+
end
|
118
121
|
end
|
119
122
|
|
120
123
|
# Filter examples
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mutant-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.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-12-
|
11
|
+
date: 2014-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mutant
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.7.
|
19
|
+
version: 0.7.4
|
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
|
-
version: 0.7.
|
26
|
+
version: 0.7.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec-core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|