mocha 1.10.0.alpha → 1.10.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/RELEASE.md +4 -0
  3. data/docs/Mocha.html +2 -2
  4. data/docs/Mocha/API.html +2 -2
  5. data/docs/Mocha/ClassMethods.html +2 -77
  6. data/docs/Mocha/Configuration.html +2 -2
  7. data/docs/Mocha/Expectation.html +2 -2
  8. data/docs/Mocha/ExpectationError.html +2 -2
  9. data/docs/Mocha/ExpectationErrorFactory.html +2 -2
  10. data/docs/Mocha/Hooks.html +2 -2
  11. data/docs/Mocha/Integration.html +2 -2
  12. data/docs/Mocha/Integration/MiniTest.html +2 -2
  13. data/docs/Mocha/Integration/MiniTest/Adapter.html +2 -2
  14. data/docs/Mocha/Integration/TestUnit.html +2 -2
  15. data/docs/Mocha/Integration/TestUnit/Adapter.html +2 -2
  16. data/docs/Mocha/Mock.html +2 -2
  17. data/docs/Mocha/ObjectMethods.html +2 -2
  18. data/docs/Mocha/ParameterMatchers.html +2 -2
  19. data/docs/Mocha/ParameterMatchers/AllOf.html +2 -2
  20. data/docs/Mocha/ParameterMatchers/AnyOf.html +2 -2
  21. data/docs/Mocha/ParameterMatchers/AnyParameters.html +2 -2
  22. data/docs/Mocha/ParameterMatchers/Anything.html +2 -2
  23. data/docs/Mocha/ParameterMatchers/Base.html +2 -2
  24. data/docs/Mocha/ParameterMatchers/Equals.html +2 -2
  25. data/docs/Mocha/ParameterMatchers/EquivalentUri.html +2 -2
  26. data/docs/Mocha/ParameterMatchers/HasEntries.html +2 -2
  27. data/docs/Mocha/ParameterMatchers/HasEntry.html +2 -2
  28. data/docs/Mocha/ParameterMatchers/HasKey.html +2 -2
  29. data/docs/Mocha/ParameterMatchers/HasValue.html +2 -2
  30. data/docs/Mocha/ParameterMatchers/Includes.html +2 -2
  31. data/docs/Mocha/ParameterMatchers/InstanceOf.html +2 -2
  32. data/docs/Mocha/ParameterMatchers/IsA.html +2 -2
  33. data/docs/Mocha/ParameterMatchers/KindOf.html +2 -2
  34. data/docs/Mocha/ParameterMatchers/Not.html +2 -2
  35. data/docs/Mocha/ParameterMatchers/Optionally.html +2 -2
  36. data/docs/Mocha/ParameterMatchers/RegexpMatches.html +2 -2
  37. data/docs/Mocha/ParameterMatchers/RespondsWith.html +2 -2
  38. data/docs/Mocha/ParameterMatchers/YamlEquivalent.html +2 -2
  39. data/docs/Mocha/Sequence.html +2 -2
  40. data/docs/Mocha/StateMachine.html +2 -2
  41. data/docs/Mocha/StateMachine/State.html +2 -2
  42. data/docs/Mocha/StateMachine/StatePredicate.html +2 -2
  43. data/docs/Mocha/StubbingError.html +2 -2
  44. data/docs/_index.html +3 -3
  45. data/docs/file.COPYING.html +2 -2
  46. data/docs/file.MIT-LICENSE.html +2 -2
  47. data/docs/file.README.html +2 -2
  48. data/docs/file.RELEASE.html +8 -2
  49. data/docs/frames.html +1 -1
  50. data/docs/index.html +2 -2
  51. data/docs/method_list.html +48 -56
  52. data/docs/top-level-namespace.html +2 -2
  53. data/lib/mocha/class_methods.rb +3 -2
  54. data/lib/mocha/mockery.rb +2 -2
  55. data/lib/mocha/stubbed_method.rb +2 -2
  56. data/lib/mocha/version.rb +1 -1
  57. metadata +2 -2
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Top Level Namespace
8
8
 
9
- &mdash; Mocha 1.10.0.alpha
9
+ &mdash; Mocha 1.10.0.beta.1
10
10
 
11
11
  </title>
12
12
 
@@ -108,7 +108,7 @@
108
108
  </div>
109
109
 
110
110
  <div id="footer">
111
- Generated on Sun Nov 24 15:26:48 2019 by
111
+ Generated on Tue Nov 26 21:53:01 2019 by
112
112
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
113
113
  0.9.20 (ruby-2.6.5).
114
114
  </div>
@@ -49,13 +49,14 @@ module Mocha
49
49
  @any_instance ||= AnyInstance.new(self)
50
50
  end
51
51
 
52
+ # @private
52
53
  # rubocop:disable Metrics/CyclomaticComplexity
53
- def method_visibility(method, include_public_methods = true)
54
+ def __method_visibility__(method, include_public_methods = true)
54
55
  (include_public_methods && public_method_defined?(method) && :public) ||
55
56
  (protected_method_defined?(method) && :protected) ||
56
57
  (private_method_defined?(method) && :private)
57
58
  end
58
59
  # rubocop:enable Metrics/CyclomaticComplexity
59
- alias_method :method_exists?, :method_visibility
60
+ alias_method :__method_exists__?, :__method_visibility__
60
61
  end
61
62
  end
@@ -129,10 +129,10 @@ module Mocha
129
129
  method = PRE_RUBY_V19 ? method.to_s : method.to_sym
130
130
  method_signature = "#{object.mocha_inspect}.#{method}"
131
131
  check(:stubbing_non_existent_method, 'non-existent method', method_signature) do
132
- !(object.stubba_class.method_exists?(method, true) || object.respond_to?(method.to_sym))
132
+ !(object.stubba_class.__method_exists__?(method, true) || object.respond_to?(method.to_sym))
133
133
  end
134
134
  check(:stubbing_non_public_method, 'non-public method', method_signature) do
135
- object.stubba_class.method_exists?(method, false)
135
+ object.stubba_class.__method_exists__?(method, false)
136
136
  end
137
137
  check(:stubbing_method_on_nil, 'method on nil', method_signature) { object.nil? }
138
138
  check(:stubbing_method_on_non_mock_object, 'method on non-mock object', method_signature)
@@ -36,7 +36,7 @@ module Mocha
36
36
  end
37
37
 
38
38
  def hide_original_method
39
- return unless original_method_owner.method_exists?(method_name)
39
+ return unless original_method_owner.__method_exists__?(method_name)
40
40
  store_original_method_visibility
41
41
  if use_prepended_module_for_stub_method?
42
42
  use_prepended_module_for_stub_method
@@ -100,7 +100,7 @@ module Mocha
100
100
  attr_reader :original_method, :original_visibility
101
101
 
102
102
  def store_original_method_visibility
103
- @original_visibility = original_method_owner.method_visibility(method_name)
103
+ @original_visibility = original_method_owner.__method_visibility__(method_name)
104
104
  end
105
105
 
106
106
  def stub_method_overwrites_original_method?
@@ -1,3 +1,3 @@
1
1
  module Mocha
2
- VERSION = '1.10.0.alpha'.freeze
2
+ VERSION = '1.10.0.beta.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mocha
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0.alpha
4
+ version: 1.10.0.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Mead
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-24 00:00:00.000000000 Z
11
+ date: 2019-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake