mutant-rspec 0.5.15 → 0.5.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 73a2e168d8c3c2fdbba6a5618aa2d36cf12eb284
4
- data.tar.gz: b63abdb14dd6b964780cd1b267ef3dc72129dbb0
3
+ metadata.gz: ee915ddcafc038b972982730f557b7052f26593a
4
+ data.tar.gz: 17a69c6678b4ec11cf00d7ec86235d1dc3c3d800
5
5
  SHA512:
6
- metadata.gz: c9f857417cf5b371e609c530c019d7b2401872ca605b7a2a6fe0f066923b5832dbd16d72213fe7d2c36047ffedbe471abad13e5c19cd73ef12a3e4bf60ebef2d
7
- data.tar.gz: a45fc5c3675adbfe374b991a113438a5a7ce290eb12ca92b217c0c27382368295d6876830f27dfbbd80a718151057cc31e6d552cb672a2a6799b8710c266db58
6
+ metadata.gz: cc39c8d11a5f9189224ff902051e50f2fd0ec1b8a1bc8284d251cdd7f6ef6474e93171538e35888de6a567f4e86373e7f7449b6303d39fce525b7a85866a44c6
7
+ data.tar.gz: 6762ce0802df6fdf215697a7754e53b916999fc220bdce988739c94be5d0781e9d94a0c365750afd2002430603a6b8158e9ec1369574ee798e4cbf935eab6f83
@@ -23,6 +23,16 @@ module Mutant
23
23
  end
24
24
  memoize :setup
25
25
 
26
+ # Test for rspec2
27
+ #
28
+ # @return [Boolean]
29
+ #
30
+ # @api private
31
+ #
32
+ def rspec2?
33
+ RSpec::Core::Version::STRING.start_with?(RSPEC_2_VERSION_PREFIX)
34
+ end
35
+
26
36
  # Return report for test
27
37
  #
28
38
  # @param [Rspec::Test] test
@@ -51,9 +61,12 @@ module Mutant
51
61
  # @api private
52
62
  #
53
63
  def all_tests
54
- example_groups.map do |example_group|
55
- Test.new(self, example_group)
56
- end
64
+ example_groups
65
+ .flat_map(&:descendants)
66
+ .select { |example_group| example_group.descendants.one? }
67
+ .map do |example_group|
68
+ Test.new(self, example_group)
69
+ end
57
70
  end
58
71
  memoize :all_tests
59
72
 
@@ -94,20 +107,6 @@ module Mutant
94
107
  end
95
108
  end
96
109
 
97
- # Detect RSpec 2
98
- #
99
- # @return [true]
100
- # when RSpec 2
101
- #
102
- # @return [false]
103
- # otherwise
104
- #
105
- # @api private
106
- #
107
- def rspec2?
108
- RSpec::Core::Version::STRING.start_with?(RSPEC_2_VERSION_PREFIX)
109
- end
110
-
111
110
  # Return configuration
112
111
  #
113
112
  # @return [RSpec::Core::Configuration]
@@ -13,7 +13,12 @@ module Mutant
13
13
  # @api private
14
14
  #
15
15
  def subject_identification
16
- example_group.description
16
+ metadata = example_group.metadata
17
+ if strategy.rspec2?
18
+ metadata.fetch(:example_group).fetch(:full_description)
19
+ else
20
+ metadata.fetch(:full_description)
21
+ end
17
22
  end
18
23
  memoize :subject_identification
19
24
 
metadata CHANGED
@@ -1,67 +1,67 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutant-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.15
4
+ version: 0.5.16
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-05-24 00:00:00.000000000 Z
11
+ date: 2014-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mutant
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 0.5.15
19
+ version: 0.5.16
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.5.15
26
+ version: 0.5.16
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec-core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 2.14.1
34
- - - "<="
34
+ - - <=
35
35
  - !ruby/object:Gem::Version
36
36
  version: 3.0.0.rc1
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - ">="
41
+ - - '>='
42
42
  - !ruby/object:Gem::Version
43
43
  version: 2.14.1
44
- - - "<="
44
+ - - <=
45
45
  - !ruby/object:Gem::Version
46
46
  version: 3.0.0.rc1
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
51
+ - - ~>
52
52
  - !ruby/object:Gem::Version
53
53
  version: '1.3'
54
- - - ">="
54
+ - - '>='
55
55
  - !ruby/object:Gem::Version
56
56
  version: 1.3.5
57
57
  type: :development
58
58
  prerelease: false
59
59
  version_requirements: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - "~>"
61
+ - - ~>
62
62
  - !ruby/object:Gem::Version
63
63
  version: '1.3'
64
- - - ">="
64
+ - - '>='
65
65
  - !ruby/object:Gem::Version
66
66
  version: 1.3.5
67
67
  description: Rspec integration for mutant
@@ -73,12 +73,12 @@ extra_rdoc_files:
73
73
  - TODO
74
74
  - LICENSE
75
75
  files:
76
- - LICENSE
77
- - TODO
78
76
  - lib/mutant-rspec.rb
79
77
  - lib/mutant/rspec.rb
80
78
  - lib/mutant/rspec/strategy.rb
81
79
  - lib/mutant/rspec/test.rb
80
+ - TODO
81
+ - LICENSE
82
82
  homepage: https://github.com/mbj/mutant
83
83
  licenses:
84
84
  - MIT
@@ -89,17 +89,17 @@ require_paths:
89
89
  - lib
90
90
  required_ruby_version: !ruby/object:Gem::Requirement
91
91
  requirements:
92
- - - ">="
92
+ - - '>='
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
95
  required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - ">="
97
+ - - '>='
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  requirements: []
101
101
  rubyforge_project:
102
- rubygems_version: 2.2.2
102
+ rubygems_version: 2.0.14
103
103
  signing_key:
104
104
  specification_version: 4
105
105
  summary: Rspec integration for mutant