flexmock 2.3.3 → 2.3.4

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: 7d1c60d1a5f14850c56b0e8d61f4521fb1c9e060
4
- data.tar.gz: 94039089f129be52329e975e587761ea2bf633f1
3
+ metadata.gz: 5a19c4b387841ace58998982852710a4f60f9eca
4
+ data.tar.gz: f978bfe038886bb05bde989258862e4a3278f5e3
5
5
  SHA512:
6
- metadata.gz: af6c7bdccd67fa9583623d3f3fb6f052a682e1e408a8fc091b907c18814f891e5e1a80c9766d0136ca19eddfc5df891a3f51f16225872778e14a6b6438f2072e
7
- data.tar.gz: 8fbbf4e0ecf57fde540642e6978d8bcb3d67ef0e532fb3437791cd760a83266df197df5e5fd38f80a3fc8bd91c9663c80c68aef656a2a9b061ba8d8376849dfb
6
+ metadata.gz: 58ce6ec7b11b4ab418fbea7d6cd5fa381fa23c6bdcb7000de8e29a17215c8ef18625e51784b478b2acfd13e563ca6e7ff01b36312da3bd779f03e9d40c485958
7
+ data.tar.gz: 0f18615a4cb83cfb14e4d5549ad5abd0b5863d04195005f93ecba5ad028ce193a7825e4464d808911638888fc9c215a5b0d6db14ff154581a047ec356aa4d3d7
@@ -245,6 +245,8 @@ class FlexMock
245
245
  flexmock_define_expectation(caller, *args)
246
246
  end
247
247
 
248
+ ON_RUBY_20 = (RUBY_VERSION =~ /^2\.0\./)
249
+
248
250
  # Using +location+, define the expectations specified by +args+.
249
251
  def flexmock_define_expectation(location, *args)
250
252
  @last_expectation = EXP_BUILDER.parse_should_args(self, args) do |method_name|
@@ -253,8 +255,12 @@ class FlexMock
253
255
  result = Expectation.new(self, method_name, location)
254
256
  exp << result
255
257
  override_existing_method(method_name) if flexmock_respond_to?(method_name, true)
256
- result = ExplicitNeeded.new(result, method_name, @base_class) if
257
- @base_class && ! @base_class.flexmock_defined?(method_name)
258
+
259
+ if @base_class && !@base_class.flexmock_defined?(method_name)
260
+ if !ON_RUBY_20 || !@base_class.ancestors.include?(Class)
261
+ result = ExplicitNeeded.new(result, method_name, @base_class)
262
+ end
263
+ end
258
264
  result
259
265
  end
260
266
  end
@@ -1,3 +1,3 @@
1
1
  class FlexMock
2
- VERSION = "2.3.3"
2
+ VERSION = "2.3.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flexmock
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.3
4
+ version: 2.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Weirich
@@ -15,56 +15,56 @@ dependencies:
15
15
  name: minitest
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
18
+ - - '>='
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ">="
25
+ - - '>='
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ">="
32
+ - - '>='
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ">="
39
+ - - '>='
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: simplecov
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ">="
46
+ - - '>='
47
47
  - !ruby/object:Gem::Version
48
48
  version: 0.11.0
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ">="
53
+ - - '>='
54
54
  - !ruby/object:Gem::Version
55
55
  version: 0.11.0
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: coveralls
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ">="
60
+ - - '>='
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ">="
67
+ - - '>='
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  description: "\n FlexMock is a extremely simple mock object class compatible\n
@@ -75,11 +75,11 @@ executables: []
75
75
  extensions: []
76
76
  extra_rdoc_files: []
77
77
  files:
78
- - ".autotest"
79
- - ".gitignore"
80
- - ".togglerc"
81
- - ".travis.yml"
82
- - ".yardopts"
78
+ - .autotest
79
+ - .gitignore
80
+ - .togglerc
81
+ - .travis.yml
82
+ - .yardopts
83
83
  - CHANGES
84
84
  - Gemfile
85
85
  - README.md
@@ -175,17 +175,17 @@ require_paths:
175
175
  - lib
176
176
  required_ruby_version: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ">="
178
+ - - '>='
179
179
  - !ruby/object:Gem::Version
180
180
  version: '2.0'
181
181
  required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  requirements:
183
- - - ">="
183
+ - - '>='
184
184
  - !ruby/object:Gem::Version
185
185
  version: '0'
186
186
  requirements: []
187
187
  rubyforge_project:
188
- rubygems_version: 2.5.1
188
+ rubygems_version: 2.0.14
189
189
  signing_key:
190
190
  specification_version: 4
191
191
  summary: Simple and Flexible Mock Objects for Testing