mocha 0.13.2 → 0.13.3

Sign up to get free protection for your applications and to get access to all the features.
data/COPYING.md CHANGED
@@ -1,3 +1,3 @@
1
1
  Copyright Revieworld Ltd. 2006
2
2
 
3
- You may use, copy and redistribute this library under the same terms as [Ruby itself](http://www.ruby-lang.org/en/LICENSE.txt) or under the [MIT license](http://www.opensource.org/licenses/MIT).
3
+ You may use, copy and redistribute this library under the same terms as [Ruby itself](http://www.ruby-lang.org/en/LICENSE.txt) or under the [MIT license](http://www.opensource.org/licenses/MIT).
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
- gemspec
3
+ gemspec
@@ -4,4 +4,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
4
 
5
5
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
6
 
7
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -41,15 +41,15 @@ If you're loading Mocha using Bundler within a Rails application, you should ens
41
41
  # At bottom of test_helper.rb
42
42
  require "mocha/setup"
43
43
 
44
- Note: Using the latest version of Mocha (0.13.1) with the latest versions of Rails (e.g. 3.2.11, 3.1.10, or 3.0.19), you will see the following Mocha deprecation warning:
44
+ Note: Using the latest version of Mocha (0.13.2) with the latest versions of Rails (e.g. 3.2.12) or _some_ recent versions of Rails (e.g. 3.1.10, or 3.0.19), you will see the following Mocha deprecation warning:
45
45
 
46
46
  *** Mocha deprecation warning: Change `require 'mocha'` to `require 'mocha/setup'`.
47
47
 
48
48
  This will happen until new versions of Rails are released incorporating the following pull requests:
49
49
 
50
50
  * 3-2-stable - https://github.com/rails/rails/pull/8200
51
- * 3-1-stable - https://github.com/rails/rails/pull/8871
52
- * 3-0-stable - https://github.com/rails/rails/pull/8872
51
+ * ~~3-1-stable - https://github.com/rails/rails/pull/8871~~ [released in 3.1.11]
52
+ * ~~3-0-stable - https://github.com/rails/rails/pull/8872~~ [released in 3.0.20]
53
53
 
54
54
  The deprecation warning will not cause any problems, but if you don't like seeing then you could do one of the following:
55
55
 
@@ -59,7 +59,7 @@ The deprecation warning will not cause any problems, but if you don't like seein
59
59
  if Rails.env.test? || Rails.env.development?
60
60
  require "mocha/version"
61
61
  require "mocha/deprecation"
62
- if Mocha::VERSION == "0.13.2" && Rails::VERSION::STRING == "3.2.11"
62
+ if Mocha::VERSION == "0.13.2" && Rails::VERSION::STRING == "3.2.12"
63
63
  Mocha::Deprecation.mode = :disabled
64
64
  end
65
65
  end
@@ -78,10 +78,10 @@ Note 2: This will not work with recent versions of the Test::Unit gem (see below
78
78
  # test/test_helper.rb
79
79
  require "mocha/setup"
80
80
 
81
- ##### Option 3 - Downgrade to Mocha 0.12.8
81
+ ##### Option 3 - Downgrade to the latest 0.12.x version of Mocha
82
82
 
83
83
  # Gemfile in Rails app
84
- gem "mocha", "~> 0.12.8", :require => false
84
+ gem "mocha", "~> 0.12.10", :require => false
85
85
 
86
86
  # At bottom of test_helper.rb
87
87
  require "mocha"
data/RELEASE.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Release Notes
2
2
 
3
+ ## 0.13.3
4
+ * Allow `Mocha::ParameterMatchers#includes` to accept multiple items. Thanks to @simao.
5
+ * Allow stubbing of *private* `Kernel` methods. Fixes #134. Thanks to @camski for reporting.
6
+ * Avoid a warning when `test/unit/version` is required by other libraries in the same project. Fixes #140. Thanks to @tmiller.
7
+ * Make auto-activation of Test::Unit integration more resilient. This change is specifically to cope with the nasty re-defining of classes that is done by the `minitest-spec-rails` gem. Fixes #143. Thanks to @tubaxenor for reporting.
8
+ * Safer restoration of stubbed method visibility. Fixes #141. Thanks to @tmm1.
9
+ * Ensure `Mockery` instance gets reset even if exception raised. Fixes #144.
10
+ * Adapt Mocha acceptance tests to cope with changes in output from latest (v4.6.2) of MiniTest.
11
+ * Updates to README about Rails compatibility.
12
+
3
13
  ## 0.13.2
4
14
  * Stubbing of methods re-declared with different visibilty. Fixes #109.
5
15
  * Add `Mock#responds_like_instance_of`. Fixes #119.
@@ -1,7 +1,7 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path=>"../"
4
4
 
5
5
  group :development do
6
6
  gem "minitest", "1.3.0"
7
- end
7
+ end
@@ -1,7 +1,7 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path=>"../"
4
4
 
5
5
  group :development do
6
6
  gem "minitest", "1.4.0"
7
- end
7
+ end
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path=>"../"
4
4
 
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path=>"../"
4
4
 
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path=>"../"
4
4
 
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path=>"../"
4
4
 
@@ -1,7 +1,7 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path=>"../"
4
4
 
5
5
  group :development do
6
6
  gem "minitest", "2.11.0"
7
- end
7
+ end
@@ -1,7 +1,7 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path=>"../"
4
4
 
5
5
  group :development do
6
6
  gem "minitest", "2.11.2"
7
- end
7
+ end
@@ -1,7 +1,7 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path=>"../"
4
4
 
5
5
  group :development do
6
6
  gem "minitest", "2.3.0"
7
- end
7
+ end
@@ -1,7 +1,7 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path=>"../"
4
4
 
5
5
  group :development do
6
6
  gem "minitest"
7
- end
7
+ end
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path=>"../"
4
4
 
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path=>"../"
4
4
 
@@ -1,7 +1,7 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path=>"../"
4
4
 
5
5
  group :development do
6
6
  gem "test-unit", "2.0.3"
7
- end
7
+ end
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path=>"../"
4
4
 
data/init.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  # Mocha should no longer be loaded at plugin load time
2
2
  # You should explicitly load Mocha *after* Test::Unit or MiniTest have been loaded
3
- # e.g. by adding "require 'mocha'" at the bottom of test/test_helper.rb
3
+ # e.g. by adding "require 'mocha'" at the bottom of test/test_helper.rb
@@ -46,7 +46,7 @@ module Mocha
46
46
  def restore_original_method
47
47
  if @original_method && @original_method.owner == stubbee
48
48
  stubbee.send(:define_method, method, @original_method)
49
- stubbee.send(@original_visibility, method)
49
+ Module.instance_method(@original_visibility).bind(stubbee).call(method)
50
50
  end
51
51
  end
52
52
 
@@ -77,7 +77,7 @@ module Mocha
77
77
  end
78
78
  end
79
79
  if @original_visibility
80
- stubbee.__metaclass__.send(@original_visibility, method)
80
+ Module.instance_method(@original_visibility).bind(stubbee.__metaclass__).call(method)
81
81
  end
82
82
  end
83
83
 
@@ -29,14 +29,15 @@ module Mocha
29
29
  #
30
30
  # This method should be called at the end of each individual test, before it has been determined whether or not the test has passed.
31
31
  def mocha_verify(assertion_counter = nil)
32
- Mockery.instance.verify(assertion_counter)
32
+ Mockery.verify(assertion_counter)
33
33
  end
34
34
 
35
35
  # Resets Mocha after a test (only for use by authors of test libraries).
36
36
  #
37
37
  # This method should be called after each individual test has finished (including after any "teardown" code).
38
38
  def mocha_teardown
39
- Mockery.instance.teardown
39
+ Mockery.teardown
40
+ ensure
40
41
  Mockery.reset_instance
41
42
  end
42
43
  end
@@ -13,10 +13,10 @@ module Mocha
13
13
  module Integration
14
14
  module TestUnit
15
15
  def self.activate
16
- return false unless defined?(::Test::Unit::TestCase) && !(defined?(::MiniTest::Unit::TestCase) && (::Test::Unit::TestCase < ::MiniTest::Unit::TestCase))
16
+ return false unless defined?(::Test::Unit::TestCase) && !(defined?(::MiniTest::Unit::TestCase) && (::Test::Unit::TestCase < ::MiniTest::Unit::TestCase)) && !(defined?(::MiniTest::Spec) && (::Test::Unit::TestCase < ::MiniTest::Spec))
17
17
 
18
18
  test_unit_version = begin
19
- load 'test/unit/version.rb'
19
+ require 'test/unit/version'
20
20
  Gem::Version.new(::Test::Unit::VERSION)
21
21
  rescue LoadError
22
22
  Gem::Version.new('1.0.0')
@@ -270,7 +270,7 @@ module Mocha
270
270
 
271
271
  # @private
272
272
  def ensure_method_not_already_defined(method_name)
273
- self.__metaclass__.send(:undef_method, method_name) if self.__metaclass__.method_defined?(method_name)
273
+ self.__metaclass__.send(:undef_method, method_name) if self.__metaclass__.method_defined?(method_name) || self.__metaclass__.private_method_defined?(method_name)
274
274
  end
275
275
 
276
276
  # @private
@@ -17,6 +17,14 @@ module Mocha
17
17
  @instance ||= new
18
18
  end
19
19
 
20
+ def verify(*args)
21
+ instance.verify(*args)
22
+ end
23
+
24
+ def teardown
25
+ instance.teardown
26
+ end
27
+
20
28
  def reset_instance
21
29
  @instance = nil
22
30
  end
@@ -1,47 +1,56 @@
1
+ require 'mocha/parameter_matchers/all_of'
1
2
  require 'mocha/parameter_matchers/base'
2
3
 
3
4
  module Mocha
4
5
 
5
6
  module ParameterMatchers
6
7
 
7
- # Matches any object that responds with +true+ to +include?(item)+.
8
+ # Matches any object that responds with +true+ to +include?(item)+
9
+ # for all items.
8
10
  #
9
- # @param [Object] item expected item.
11
+ # @param [*Array] items expected items.
10
12
  # @return [Includes] parameter matcher.
11
13
  #
12
14
  # @see Expectation#with
13
15
  #
14
- # @example Actual parameter includes item.
16
+ # @example Actual parameter includes all items.
15
17
  # object = mock()
16
- # object.expects(:method_1).with(includes('foo'))
17
- # object.method_1(['foo', 'bar'])
18
+ # object.expects(:method_1).with(includes('foo', 'bar'))
19
+ # object.method_1(['foo', 'bar', 'baz'])
18
20
  # # no error raised
19
21
  #
20
- # @example Actual parameter does not include item.
21
- # object.method_1(['baz'])
22
- # # error raised, because ['baz'] does not include 'foo'.
23
- def includes(item)
24
- Includes.new(item)
22
+ # @example Actual parameter does not include all items.
23
+ # object.method_1(['foo', 'baz'])
24
+ # # error raised, because ['foo', 'baz'] does not include 'bar'.
25
+ def includes(*items)
26
+ Includes.new(*items)
25
27
  end
26
28
 
27
- # Parameter matcher which matches when actual parameter includes expected value.
29
+ # Parameter matcher which matches when actual parameter includes expected values.
28
30
  class Includes < Base
29
31
 
30
32
  # @private
31
- def initialize(item)
32
- @item = item
33
+ def initialize(*items)
34
+ @items = items
33
35
  end
34
36
 
35
37
  # @private
36
38
  def matches?(available_parameters)
37
39
  parameter = available_parameters.shift
38
40
  return false unless parameter.respond_to?(:include?)
39
- return parameter.include?(@item)
41
+
42
+ if @items.size == 1
43
+ return parameter.include?(@items.first)
44
+ else
45
+ includes_matchers = @items.map { |item| Includes.new(item) }
46
+ AllOf.new(*includes_matchers).matches?([parameter])
47
+ end
40
48
  end
41
49
 
42
50
  # @private
43
51
  def mocha_inspect
44
- "includes(#{@item.mocha_inspect})"
52
+ item_descriptions = @items.map(&:mocha_inspect)
53
+ "includes(#{item_descriptions.join(', ')})"
45
54
  end
46
55
 
47
56
  end
@@ -1,3 +1,3 @@
1
1
  module Mocha
2
- VERSION = "0.13.2"
2
+ VERSION = "0.13.3"
3
3
  end
@@ -32,6 +32,8 @@ class StubAnyInstanceMethodTest < Test::Unit::TestCase
32
32
  def my_instance_method
33
33
  :original_return_value
34
34
  end
35
+ public :my_instance_method
36
+ def self.public(*args); end
35
37
  end
36
38
  instance = klass.new
37
39
  run_as_test do
@@ -47,6 +49,7 @@ class StubAnyInstanceMethodTest < Test::Unit::TestCase
47
49
  :original_return_value
48
50
  end
49
51
  protected :my_instance_method
52
+ def self.protected(*args); end
50
53
  def my_unprotected_instance_method
51
54
  my_instance_method
52
55
  end
@@ -65,6 +68,7 @@ class StubAnyInstanceMethodTest < Test::Unit::TestCase
65
68
  :original_return_value
66
69
  end
67
70
  private :my_instance_method
71
+ def self.private(*args); end
68
72
  end
69
73
  instance = klass.new
70
74
  run_as_test do
@@ -20,6 +20,7 @@ class StubClassMethodDefinedOnClassTest < Test::Unit::TestCase
20
20
  :original_return_value
21
21
  end
22
22
  public :my_class_method
23
+ def self.public(*args); end
23
24
  end
24
25
  end
25
26
  assert_snapshot_unchanged(klass) do
@@ -39,6 +40,7 @@ class StubClassMethodDefinedOnClassTest < Test::Unit::TestCase
39
40
  :original_return_value
40
41
  end
41
42
  protected :my_class_method
43
+ def self.protected(*args); end
42
44
  end
43
45
  end
44
46
  assert_snapshot_unchanged(klass) do
@@ -58,6 +60,7 @@ class StubClassMethodDefinedOnClassTest < Test::Unit::TestCase
58
60
  :original_return_value
59
61
  end
60
62
  private :my_class_method
63
+ def self.private(*args); end
61
64
  end
62
65
  end
63
66
  assert_snapshot_unchanged(klass) do
@@ -3,20 +3,28 @@ require 'minitest/unit'
3
3
 
4
4
  class MiniTestResult
5
5
 
6
- FAILURE_PATTERN = %r{(Failure)\:\n([^\(]+)\(([^\)]+)\) \[([^\]]+)\]\:\n(.*)\n}m
7
- ERROR_PATTERN = %r{(Error)\:\n([^\(]+)\(([^\)]+)\)\:\n(.+?)\n}m
6
+ minitest_version = Gem::Version.new(::MiniTest::Unit::VERSION)
7
+ if Gem::Requirement.new('<= 4.6.1').satisfied_by?(minitest_version)
8
+ FAILURE_PATTERN = %r{(Failure)\:\n([^\(]+)\(([^\)]+)\) \[([^\]]+)\]\:\n(.*)\n}m
9
+ ERROR_PATTERN = %r{(Error)\:\n([^\(]+)\(([^\)]+)\)\:\n(.+?)\n}m
10
+ PATTERN_INDICES = { :method => 2, :testcase => 3 }
11
+ else
12
+ FAILURE_PATTERN = %r{(Failure)\:\n.([^#]+)\#([^ ]+) \[([^\]]+)\]\:\n(.*)\n}m
13
+ ERROR_PATTERN = %r{(Error)\:\n.([^#]+)\#([^ ]+)\:\n(.+?)\n}m
14
+ PATTERN_INDICES = { :method => 3, :testcase => 2 }
15
+ end
8
16
 
9
17
  def self.parse_failure(raw)
10
18
  matches = FAILURE_PATTERN.match(raw)
11
19
  return nil unless matches
12
- Failure.new(matches[2], matches[3], [matches[4]], matches[5])
20
+ Failure.new(matches[PATTERN_INDICES[:method]], matches[PATTERN_INDICES[:testcase]], [matches[4]], matches[5])
13
21
  end
14
22
 
15
23
  def self.parse_error(raw)
16
24
  matches = ERROR_PATTERN.match(raw)
17
25
  return nil unless matches
18
26
  backtrace = raw.gsub(ERROR_PATTERN, '').split("\n").map(&:strip)
19
- Error.new(matches[2], matches[3], matches[4], backtrace)
27
+ Error.new(matches[PATTERN_INDICES[:method]], matches[PATTERN_INDICES[:testcase]], matches[4], backtrace)
20
28
  end
21
29
 
22
30
  class Failure
@@ -1,5 +1,5 @@
1
1
  unless defined?(STANDARD_OBJECT_PUBLIC_INSTANCE_METHODS)
2
- STANDARD_OBJECT_PUBLIC_INSTANCE_METHODS = Object.public_instance_methods
2
+ STANDARD_OBJECT_PUBLIC_INSTANCE_METHODS = Object.instance_methods + Object.private_instance_methods
3
3
  end
4
4
 
5
5
  $:.unshift File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))
@@ -0,0 +1,29 @@
1
+ require File.expand_path('../../test_helper', __FILE__)
2
+ require 'mocha/hooks'
3
+
4
+ class HooksTest < Test::Unit::TestCase
5
+ class Mocha::Mockery
6
+ class << self
7
+ attr_writer :instance
8
+ end
9
+ end
10
+
11
+ class FakeMockery
12
+ def verify(*args)
13
+ end
14
+
15
+ def teardown
16
+ raise "exception within Mockery#teardown"
17
+ end
18
+ end
19
+
20
+ def test_ensure_mockery_instance_is_reset_even_when_an_exception_is_raised_in_mockery_teardown
21
+ fake_test_case = Object.new.extend(Mocha::Hooks)
22
+ original_mockery = FakeMockery.new
23
+ Mocha::Mockery.instance = original_mockery
24
+
25
+ fake_test_case.mocha_teardown rescue nil
26
+
27
+ assert_not_same Mocha::Mockery.instance, original_mockery
28
+ end
29
+ end
@@ -45,9 +45,9 @@ class MockTest < Test::Unit::TestCase
45
45
  end
46
46
 
47
47
  if RUBY_VERSION < '1.9'
48
- OBJECT_METHODS = STANDARD_OBJECT_PUBLIC_INSTANCE_METHODS.reject { |m| m =~ /^__.*__$/ }
48
+ OBJECT_METHODS = STANDARD_OBJECT_PUBLIC_INSTANCE_METHODS.reject { |m| m =~ /^__.*__$/ || ["method_missing", "singleton_method_undefined", "initialize"].include?(m)}
49
49
  else
50
- OBJECT_METHODS = STANDARD_OBJECT_PUBLIC_INSTANCE_METHODS.reject { |m| m =~ /^__.*__$/ || m == :object_id }
50
+ OBJECT_METHODS = STANDARD_OBJECT_PUBLIC_INSTANCE_METHODS.reject { |m| m =~ /^__.*__$/ || [:object_id, :method_missing, :singleton_method_undefined, :initialize, :String, :singleton_method_added].include?(m) }
51
51
  end
52
52
 
53
53
  def test_should_be_able_to_mock_standard_object_methods
@@ -12,16 +12,31 @@ class IncludesTest < Test::Unit::TestCase
12
12
  assert matcher.matches?([[:x, :y, :z]])
13
13
  end
14
14
 
15
+ def test_should_match_object_including_all_values
16
+ matcher = includes(:x, :y, :z)
17
+ assert matcher.matches?([[:x, :y, :z]])
18
+ end
19
+
15
20
  def test_should_not_match_object_that_does_not_include_value
16
21
  matcher = includes(:not_included)
17
22
  assert !matcher.matches?([[:x, :y, :z]])
18
23
  end
19
24
 
20
- def test_should_describe_matcher
25
+ def test_should_not_match_object_that_does_not_include_any_one_value
26
+ matcher = includes(:x, :y, :z, :not_included)
27
+ assert !matcher.matches?([[:x, :y, :z]])
28
+ end
29
+
30
+ def test_should_describe_matcher_with_one_item
21
31
  matcher = includes(:x)
22
32
  assert_equal "includes(:x)", matcher.mocha_inspect
23
33
  end
24
34
 
35
+ def test_should_describe_matcher_with_multiple_items
36
+ matcher = includes(:x, :y, :z)
37
+ assert_equal "includes(:x, :y, :z)", matcher.mocha_inspect
38
+ end
39
+
25
40
  def test_should_not_raise_error_on_emtpy_arguments
26
41
  matcher = includes(:x)
27
42
  assert_nothing_raised { matcher.matches?([]) }
metadata CHANGED
@@ -1,103 +1,105 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: mocha
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ hash: 45
4
5
  prerelease:
5
- version: 0.13.2
6
+ segments:
7
+ - 0
8
+ - 13
9
+ - 3
10
+ version: 0.13.3
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - James Mead
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2013-01-23 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: metaclass
16
- requirement: !ruby/object:Gem::Requirement
17
+
18
+ date: 2013-03-07 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ version_requirements: &id001 !ruby/object:Gem::Requirement
17
22
  none: false
18
- requirements:
23
+ requirements:
19
24
  - - ~>
20
- - !ruby/object:Gem::Version
25
+ - !ruby/object:Gem::Version
26
+ hash: 29
27
+ segments:
28
+ - 0
29
+ - 0
30
+ - 1
21
31
  version: 0.0.1
32
+ prerelease: false
22
33
  type: :runtime
23
- version_requirements: !ruby/object:Gem::Requirement
34
+ name: metaclass
35
+ requirement: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ version_requirements: &id002 !ruby/object:Gem::Requirement
24
38
  none: false
25
- requirements:
26
- - - ~>
27
- - !ruby/object:Gem::Version
28
- version: 0.0.1
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
29
46
  prerelease: false
30
- - !ruby/object:Gem::Dependency
31
- name: rake
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
38
47
  type: :development
39
- version_requirements: !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
42
- - - ! '>='
43
- - !ruby/object:Gem::Version
44
- version: '0'
45
- prerelease: false
46
- - !ruby/object:Gem::Dependency
47
- name: introspection
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ~>
52
- - !ruby/object:Gem::Version
53
- version: 0.0.1
54
- type: :development
55
- version_requirements: !ruby/object:Gem::Requirement
48
+ name: rake
49
+ requirement: *id002
50
+ - !ruby/object:Gem::Dependency
51
+ version_requirements: &id003 !ruby/object:Gem::Requirement
56
52
  none: false
57
- requirements:
53
+ requirements:
58
54
  - - ~>
59
- - !ruby/object:Gem::Version
55
+ - !ruby/object:Gem::Version
56
+ hash: 29
57
+ segments:
58
+ - 0
59
+ - 0
60
+ - 1
60
61
  version: 0.0.1
61
62
  prerelease: false
62
- - !ruby/object:Gem::Dependency
63
- name: yard
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
63
  type: :development
71
- version_requirements: !ruby/object:Gem::Requirement
64
+ name: introspection
65
+ requirement: *id003
66
+ - !ruby/object:Gem::Dependency
67
+ version_requirements: &id004 !ruby/object:Gem::Requirement
72
68
  none: false
73
- requirements:
74
- - - ! '>='
75
- - !ruby/object:Gem::Version
76
- version: '0'
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ hash: 3
73
+ segments:
74
+ - 0
75
+ version: "0"
77
76
  prerelease: false
78
- - !ruby/object:Gem::Dependency
79
- name: redcarpet
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ~>
84
- - !ruby/object:Gem::Version
85
- version: '1'
86
77
  type: :development
87
- version_requirements: !ruby/object:Gem::Requirement
78
+ name: yard
79
+ requirement: *id004
80
+ - !ruby/object:Gem::Dependency
81
+ version_requirements: &id005 !ruby/object:Gem::Requirement
88
82
  none: false
89
- requirements:
83
+ requirements:
90
84
  - - ~>
91
- - !ruby/object:Gem::Version
92
- version: '1'
85
+ - !ruby/object:Gem::Version
86
+ hash: 1
87
+ segments:
88
+ - 1
89
+ version: "1"
93
90
  prerelease: false
94
- description: Mocking and stubbing library with JMock/SchMock syntax, which allows
95
- mocking and stubbing of methods on real (non-mock) classes.
91
+ type: :development
92
+ name: redcarpet
93
+ requirement: *id005
94
+ description: Mocking and stubbing library with JMock/SchMock syntax, which allows mocking and stubbing of methods on real (non-mock) classes.
96
95
  email: mocha-developer@googlegroups.com
97
96
  executables: []
97
+
98
98
  extensions: []
99
+
99
100
  extra_rdoc_files: []
100
- files:
101
+
102
+ files:
101
103
  - .gemtest
102
104
  - .yardopts
103
105
  - COPYING.md
@@ -299,6 +301,7 @@ files:
299
301
  - test/unit/expectation_list_test.rb
300
302
  - test/unit/expectation_test.rb
301
303
  - test/unit/hash_inspect_test.rb
304
+ - test/unit/hooks_test.rb
302
305
  - test/unit/in_state_ordering_constraint_test.rb
303
306
  - test/unit/method_matcher_test.rb
304
307
  - test/unit/mock_test.rb
@@ -338,30 +341,37 @@ files:
338
341
  - yard-templates/default/layout/html/setup.rb
339
342
  homepage: http://gofreerange.com/mocha/docs
340
343
  licenses: []
344
+
341
345
  post_install_message:
342
346
  rdoc_options: []
343
- require_paths:
347
+
348
+ require_paths:
344
349
  - lib
345
- required_ruby_version: !ruby/object:Gem::Requirement
350
+ required_ruby_version: !ruby/object:Gem::Requirement
346
351
  none: false
347
- requirements:
348
- - - ! '>='
349
- - !ruby/object:Gem::Version
350
- segments:
352
+ requirements:
353
+ - - ">="
354
+ - !ruby/object:Gem::Version
355
+ hash: 3
356
+ segments:
351
357
  - 0
352
- hash: -598143186987414032
353
- version: '0'
354
- required_rubygems_version: !ruby/object:Gem::Requirement
358
+ version: "0"
359
+ required_rubygems_version: !ruby/object:Gem::Requirement
355
360
  none: false
356
- requirements:
357
- - - ! '>='
358
- - !ruby/object:Gem::Version
359
- version: '0'
361
+ requirements:
362
+ - - ">="
363
+ - !ruby/object:Gem::Version
364
+ hash: 3
365
+ segments:
366
+ - 0
367
+ version: "0"
360
368
  requirements: []
369
+
361
370
  rubyforge_project: mocha
362
- rubygems_version: 1.8.23
371
+ rubygems_version: 1.8.24
363
372
  signing_key:
364
373
  specification_version: 3
365
374
  summary: Mocking and stubbing library
366
375
  test_files: []
376
+
367
377
  has_rdoc: yard