diff --git a/docs/Mocha.html b/docs/Mocha.html index 8f5dd4552..8a429290d 100644 --- a/docs/Mocha.html +++ b/docs/Mocha.html @@ -6,7 +6,7 @@ Module: Mocha - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -167,12 +167,12 @@

-

Examples:

+

Examples:

-

+

Setting multiple configuration options

-

+

Mocha.configure do |c|
   c.stubbing_method_unnecessarily = :prevent
@@ -236,9 +236,9 @@ 

diff --git a/docs/Mocha/API.html b/docs/Mocha/API.html index 3f7db4b52..5ac9c1b25 100644 --- a/docs/Mocha/API.html +++ b/docs/Mocha/API.html @@ -6,7 +6,7 @@ Module: Mocha::API - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -106,12 +106,12 @@

Overview

-

Examples:

+

Examples:

-

+

Verifying mock using Mock#responds_like_instance_of

-

+
class Sheep
   def initialize
@@ -323,12 +323,12 @@ 

-

Examples:

+

Examples:

-

+

Using expected_methods_vs_return_values Hash to setup expectations.

-

+

def test_motor_starts_and_stops
   motor = mock('motor', start: true, stop: true)
@@ -539,12 +539,12 @@ 

-

Examples:

+

Examples:

-

+

Ensure methods on egg are invoked in correct order.

-

+

breakfast = sequence('breakfast')
 
@@ -554,9 +554,9 @@ 

egg.expects(:eat).in_sequence(breakfast)

-

+

Ensure methods across multiple objects are invoked in correct order.

-

+
sequence = sequence(:task_order)
 
@@ -570,9 +570,9 @@ 

task_two.execute

-

+

Ensure methods on egg are invoked in the correct order using a block.

-

+
egg = mock('egg')
 sequence('breakfast') do
@@ -710,12 +710,12 @@ 

-

Examples:

+

Examples:

-

+

Constrain expected invocations to occur in particular states.

-

+

power = states('power').starts_as('off')
 
@@ -826,12 +826,12 @@ 

-

Examples:

+

Examples:

-

+

Using stubbed_methods_vs_return_values Hash to setup stubbed methods.

-

+

def test_motor_starts_and_stops
   motor = stub('motor', start: true, stop: true)
@@ -1046,12 +1046,12 @@ 

-

Examples:

+

Examples:

-

+

Ignore invocations of irrelevant methods.

-

+

def test_motor_stops
   motor = stub_everything('motor', stop: true)
@@ -1247,9 +1247,9 @@ 

diff --git a/docs/Mocha/ClassMethods.html b/docs/Mocha/ClassMethods.html index bbdc5e37a..9b59dd6b3 100644 --- a/docs/Mocha/ClassMethods.html +++ b/docs/Mocha/ClassMethods.html @@ -6,7 +6,7 @@ Module: Mocha::ClassMethods - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -162,12 +162,12 @@

-

Examples:

+

Examples:

-

+

Return false to invocation of Product#save for any instance of Product.

-

+

Product.any_instance.stubs(:save).returns(false)
 product_1 = Product.new
@@ -246,9 +246,9 @@ 

diff --git a/docs/Mocha/Configuration.html b/docs/Mocha/Configuration.html index 15f3dfb08..bb261d02a 100644 --- a/docs/Mocha/Configuration.html +++ b/docs/Mocha/Configuration.html @@ -6,7 +6,7 @@ Class: Mocha::Configuration - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -112,12 +112,12 @@

Overview

-

Examples:

+

Examples:

-

+

Setting multiple configuration options

-

+
Mocha.configure do |c|
   c.stubbing_method_unnecessarily = :prevent
@@ -375,12 +375,12 @@ 

-

Examples:

+

Examples:

-

+

Temporarily allow stubbing of nil

-

+

Mocha::Configuration.override(stubbing_method_on_nil: :allow) do
   nil.stubs(:foo)
@@ -482,12 +482,12 @@ 

-

Examples:

+

Examples:

-

+

Enable display of matching invocations

-

+

Mocha.configure do |c|
   c.display_matching_invocations_on_failure = true
@@ -582,12 +582,12 @@ 

-

Examples:

+

Examples:

-

+

Loose keyword argument matching (default)

-

+


 class Example
@@ -600,9 +600,9 @@ 

# This passes the test, but would result in an ArgumentError in practice

-

+

Strict keyword argument matching

-

+

 Mocha.configure do |c|
@@ -755,12 +755,12 @@ 

-

Examples:

+

Examples:

-

+

Preventing stubbing of a method on a non-mock object

-

+

Mocha.configure do |c|
   c.stubbing_method_on_non_mock_object = :prevent
@@ -843,12 +843,12 @@ 

-

Examples:

+

Examples:

-

+

Preventing unnecessary stubbing of a method

-

+

Mocha.configure do |c|
   c.stubbing_method_unnecessarily = :prevent
@@ -927,12 +927,12 @@ 

-

Examples:

+

Examples:

-

+

Preventing stubbing of a non-existent method

-

+


 Mocha.configure do |c|
@@ -1015,12 +1015,12 @@ 

-

Examples:

+

Examples:

-

+

Preventing stubbing of a non-public method

-

+

Mocha.configure do |c|
   c.stubbing_non_public_method = :prevent
@@ -1085,9 +1085,9 @@ 

diff --git a/docs/Mocha/Expectation.html b/docs/Mocha/Expectation.html index e63f67160..714b80176 100644 --- a/docs/Mocha/Expectation.html +++ b/docs/Mocha/Expectation.html @@ -6,7 +6,7 @@ Class: Mocha::Expectation - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -610,12 +610,12 @@

-

Examples:

+

Examples:

-

+

Expected method must be called at least twice.

-

+

object = mock()
 object.expects(:expected_method).at_least(2)
@@ -711,12 +711,12 @@ 

-

Examples:

+

Examples:

-

+

Expected method must be called at least once.

-

+

object = mock()
 object.expects(:expected_method).at_least_once
@@ -789,12 +789,12 @@ 

-

Examples:

+

Examples:

-

+

Expected method must be called at most twice.

-

+

object = mock()
 object.expects(:expected_method).at_most(2)
@@ -889,12 +889,12 @@ 

-

Examples:

+

Examples:

-

+

Expected method must be called at most once.

-

+

object = mock()
 object.expects(:expected_method).at_most_once
@@ -975,12 +975,12 @@ 

-

Examples:

+

Examples:

-

+

Ensure methods are invoked in a specified order.

-

+

breakfast = sequence('breakfast')
 
@@ -1098,12 +1098,12 @@ 

-

Examples:

+

Examples:

-

+

When foreach is called, the stub will invoke the block twice, the first time it passes [‘row1_col1’, ‘row1_col2’] as the parameters, and the second time it passes [‘row2_col1’, ”] as the parameters.

-

+

csv = mock()
 csv.expects(:foreach).with("path/to/file.csv").multiple_yields(['row1_col1', 'row1_col2'], ['row2_col1', ''])
@@ -1112,9 +1112,9 @@ 

rows # => [['row1_col1', 'row1_col2'], ['row2_col1', '']]

-

+

Yield different groups of parameters on different invocations of the expected method. Simulating a situation where the CSV file at ‘path/to/file.csv’ has been modified between the two calls to foreach.

-

+
csv = mock()
 csv.stubs(:foreach).with("path/to/file.csv").multiple_yields(['old_row1_col1', 'old_row1_col2'], ['old_row2_col1', '']).then.multiple_yields(['new_row1_col1', ''], ['new_row2_col1', 'new_row2_col2'])
@@ -1216,12 +1216,12 @@ 

-

Examples:

+

Examples:

-

+

Expected method must never be called.

-

+

object = mock()
 object.expects(:expected_method).never
@@ -1297,12 +1297,12 @@ 

-

Examples:

+

Examples:

-

+

Expected method must be invoked exactly once.

-

+

object = mock()
 object.expects(:expected_method).once
@@ -1388,30 +1388,30 @@ 

-

Examples:

+

Examples:

-

+

Raise specified exception if expected method is invoked.

-

+

object = stub()
 object.stubs(:expected_method).raises(Exception, 'message')
 object.expected_method # => raises exception of class Exception and with message 'message'
-

+

Raise custom exception with extra constructor parameters by passing in an instance of the exception.

-

+
object = stub()
 object.stubs(:expected_method).raises(MyException.new('message', 1, 2, 3))
 object.expected_method # => raises the specified instance of MyException
-

+

Raise different exceptions on consecutive invocations of the expected method.

-

+
object = stub()
 object.stubs(:expected_method).raises(Exception1).then.raises(Exception2)
@@ -1419,9 +1419,9 @@ 

object.expected_method # => raises exception of class Exception2

-

+

Raise an exception on first invocation of expected method and then return values on subsequent invocations.

-

+
object = stub()
 object.stubs(:expected_method).raises(Exception).then.returns(2, 3)
@@ -1546,12 +1546,12 @@ 

-

Examples:

+

Examples:

-

+

Return the same value on every invocation.

-

+

object = mock()
 object.stubs(:stubbed_method).returns('result')
@@ -1559,9 +1559,9 @@ 

object.stubbed_method # => 'result'

-

+

Return a different value on consecutive invocations.

-

+
object = mock()
 object.stubs(:stubbed_method).returns(1, 2)
@@ -1569,9 +1569,9 @@ 

object.stubbed_method # => 2

-

+

Alternative way to return a different value on consecutive invocations.

-

+
object = mock()
 object.stubs(:expected_method).returns(1, 2).then.returns(3)
@@ -1580,9 +1580,9 @@ 

object.expected_method # => 3

-

+

May be called in conjunction with #raises on the same expectation.

-

+
object = mock()
 object.stubs(:expected_method).returns(1, 2).then.raises(Exception)
@@ -1591,9 +1591,9 @@ 

object.expected_method # => raises exception of class Exception1

-

+

Note that in Ruby a method returning multiple values is exactly equivalent to a method returning an Array of those values.

-

+
object = mock()
 object.stubs(:expected_method).returns([1, 2])
@@ -1751,12 +1751,12 @@ 

-

Examples:

+

Examples:

-

+

Using #then as syntactic sugar when specifying values to be returned and exceptions to be raised on consecutive invocations of the expected method.

-

+

object = mock()
 object.stubs(:expected_method).returns(1, 2).then.raises(Exception).then.returns(4)
@@ -1766,9 +1766,9 @@ 

object.expected_method # => 4

-

+

Using #then to change the state of a state_machine on the invocation of an expected method.

-

+
power = states('power').starts_as('off')
 
@@ -1918,30 +1918,30 @@ 

-

Examples:

+

Examples:

-

+

Throw tag when expected method is invoked.

-

+

object = stub()
 object.stubs(:expected_method).throws(:done)
 object.expected_method # => throws tag :done
-

+

Throw tag with return value object c.f. Kernel#throw.

-

+
object = stub()
 object.stubs(:expected_method).throws(:done, 'result')
 object.expected_method # => throws tag :done and causes catch block to return 'result'
-

+

Throw different tags on consecutive invocations of the expected method.

-

+
object = stub()
 object.stubs(:expected_method).throws(:done).then.throws(:continue)
@@ -1949,9 +1949,9 @@ 

object.expected_method # => throws :continue

-

+

Throw tag on first invocation of expected method and then return values for subsequent invocations.

-

+
object = stub()
 object.stubs(:expected_method).throws(:done).then.returns(2, 3)
@@ -2070,12 +2070,12 @@ 

-

Examples:

+

Examples:

-

+

Specifying a specific number of expected invocations.

-

+

object = mock()
 object.expects(:expected_method).times(3)
@@ -2088,9 +2088,9 @@ 

# => verify fails

-

+

Specifying a range in the number of expected invocations.

-

+
object = mock()
 object.expects(:expected_method).times(2..4)
@@ -2186,12 +2186,12 @@ 

-

Examples:

+

Examples:

-

+

Expected method must be invoked exactly twice.

-

+

object = mock()
 object.expects(:expected_method).twice
@@ -2274,12 +2274,12 @@ 

-

Examples:

+

Examples:

-

+

Using #when to only allow invocation of methods when “power” state machine is in the “on” state.

-

+

power = states('power').starts_as('off')
 
@@ -2394,12 +2394,12 @@ 

-

Examples:

+

Examples:

-

+

Expected method must be called with exact parameter values.

-

+

object = mock()
 object.expects(:expected_method).with(:param1, :param2)
@@ -2412,9 +2412,9 @@ 

# => verify fails

-

+

Expected method must be called with parameters matching parameter matchers.

-

+
object = mock()
 object.expects(:expected_method).with(includes('string2'), anything)
@@ -2427,9 +2427,9 @@ 

# => verify fails

-

+

Loose keyword argument matching (default)

-

+

 class Example
@@ -2442,9 +2442,9 @@ 

# This passes the test, but would result in an ArgumentError in practice

-

+

Strict keyword argument matching

-

+

 Mocha.configure do |c|
@@ -2461,9 +2461,9 @@ 

# This now fails as expected

-

+

Expected method must be called with a value divisible by 4.

-

+
object = mock()
 object.expects(:expected_method).with() { |value| value % 4 == 0 }
@@ -2624,12 +2624,12 @@ 

-

Examples:

+

Examples:

-

+

Expected method must be called with a block.

-

+

object = mock()
 object.expects(:expected_method).with_block_given
@@ -2705,12 +2705,12 @@ 

-

Examples:

+

Examples:

-

+

Expected method must be called without a block.

-

+

object = mock()
 object.expects(:expected_method).with_no_block_given
@@ -2792,12 +2792,12 @@ 

-

Examples:

+

Examples:

-

+

Yield when expected method is invoked.

-

+

benchmark = mock()
 benchmark.expects(:measure).yields
@@ -2806,9 +2806,9 @@ 

yielded # => true

-

+

Yield parameters when expected method is invoked.

-

+
fibonacci = mock()
 fibonacci.expects(:next_pair).yields(0, 1)
@@ -2817,9 +2817,9 @@ 

sum # => 1

-

+

Yield different parameters on different invocations of the expected method.

-

+
fibonacci = mock()
 fibonacci.expects(:next_pair).yields(0, 1).then.yields(1, 1)
@@ -2903,9 +2903,9 @@ 

diff --git a/docs/Mocha/ExpectationError.html b/docs/Mocha/ExpectationError.html index 7678e3dc9..2f89ff1af 100644 --- a/docs/Mocha/ExpectationError.html +++ b/docs/Mocha/ExpectationError.html @@ -6,7 +6,7 @@ Exception: Mocha::ExpectationError - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -134,9 +134,9 @@

Overview

diff --git a/docs/Mocha/ExpectationErrorFactory.html b/docs/Mocha/ExpectationErrorFactory.html index b00061464..862229414 100644 --- a/docs/Mocha/ExpectationErrorFactory.html +++ b/docs/Mocha/ExpectationErrorFactory.html @@ -6,7 +6,7 @@ Class: Mocha::ExpectationErrorFactory - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -242,9 +242,9 @@

diff --git a/docs/Mocha/Hooks.html b/docs/Mocha/Hooks.html index 920667cbb..31ab01998 100644 --- a/docs/Mocha/Hooks.html +++ b/docs/Mocha/Hooks.html @@ -6,7 +6,7 @@ Module: Mocha::Hooks - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -417,9 +417,9 @@

diff --git a/docs/Mocha/Integration.html b/docs/Mocha/Integration.html index 904c86dfb..b0f642d75 100644 --- a/docs/Mocha/Integration.html +++ b/docs/Mocha/Integration.html @@ -6,7 +6,7 @@ Module: Mocha::Integration - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -107,9 +107,9 @@

Defined Under Namespace

diff --git a/docs/Mocha/Integration/MiniTest.html b/docs/Mocha/Integration/MiniTest.html index b4140dc72..08c453941 100644 --- a/docs/Mocha/Integration/MiniTest.html +++ b/docs/Mocha/Integration/MiniTest.html @@ -6,7 +6,7 @@ Module: Mocha::Integration::Minitest - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -105,9 +105,9 @@

Defined Under Namespace

diff --git a/docs/Mocha/Integration/MiniTest/Adapter.html b/docs/Mocha/Integration/MiniTest/Adapter.html index 15de83233..7bd536266 100644 --- a/docs/Mocha/Integration/MiniTest/Adapter.html +++ b/docs/Mocha/Integration/MiniTest/Adapter.html @@ -6,7 +6,7 @@ Module: Mocha::Integration::Minitest::Adapter - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -146,9 +146,9 @@

Methods included from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/Integration/TestUnit.html b/docs/Mocha/Integration/TestUnit.html index be20bc763..f0d5f2df5 100644 --- a/docs/Mocha/Integration/TestUnit.html +++ b/docs/Mocha/Integration/TestUnit.html @@ -6,7 +6,7 @@ Module: Mocha::Integration::TestUnit - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -105,9 +105,9 @@

Defined Under Namespace

diff --git a/docs/Mocha/Integration/TestUnit/Adapter.html b/docs/Mocha/Integration/TestUnit/Adapter.html index d52365b28..1161928cb 100644 --- a/docs/Mocha/Integration/TestUnit/Adapter.html +++ b/docs/Mocha/Integration/TestUnit/Adapter.html @@ -6,7 +6,7 @@ Module: Mocha::Integration::TestUnit::Adapter - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -146,9 +146,9 @@

Methods included from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/Mock.html b/docs/Mocha/Mock.html index afc283641..eadfd1f86 100644 --- a/docs/Mocha/Mock.html +++ b/docs/Mocha/Mock.html @@ -6,7 +6,7 @@ Class: Mocha::Mock - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -138,7 +138,7 @@

Overview

-

Examples:

+

Examples:

object = mock()
@@ -368,30 +368,30 @@ 

-

Examples:

+

Examples:

-

+

Expected method invoked once so no error raised

-

+

object = mock()
 object.expects(:expected_method)
 object.expected_method
-

+

Expected method not invoked so error raised

-

+

object = mock()
 object.expects(:expected_method)
 # error raised when test completes, because expected_method not called exactly once
-

+

Expected method invoked twice so error raised

-

+

object = mock()
 object.expects(:expected_method)
@@ -399,9 +399,9 @@ 

object.expected_method # => error raised when expected method invoked second time

-

+

Setup multiple expectations using expected_methods_vs_return_values.

-

+
object = mock()
 object.expects(expected_method_one: :result_one, expected_method_two: :result_two)
@@ -579,12 +579,12 @@ 

-

Examples:

+

Examples:

-

+

Normal mocking

-

+

sheep = mock('sheep')
 sheep.expects(:chew)
@@ -596,9 +596,9 @@ 

# no error raised

-

+

Using #responds_like with an instance method

-

+
class Sheep
   def chew(grass); end
@@ -614,9 +614,9 @@ 

sheep.foo # => raises NoMethodError exception

-

+

Using #responds_like with a class method

-

+
class Sheep
   def self.number_of_legs; end
@@ -732,12 +732,12 @@ 

-

Examples:

+

Examples:

-

class Sheep
   def initialize
@@ -852,12 +852,12 @@ 

-

Examples:

+

Examples:

-

+

No error raised however many times stubbed method is invoked

-

+

object = mock()
 object.stubs(:stubbed_method)
@@ -866,9 +866,9 @@ 

# no error raised

-

+

Setup multiple expectations using stubbed_methods_vs_return_values.

-

+
object = mock()
 object.stubs(stubbed_method_one: :result_one, stubbed_method_two: :result_two)
@@ -1038,12 +1038,12 @@ 

-

Examples:

+

Examples:

-

+

Invoking an unstubbed method causes error to be raised

-

+

object = mock('mock')
 object.stubs(:stubbed_method).returns(:result_one)
@@ -1052,9 +1052,9 @@ 

object.stubbed_method # => unexpected invocation: #<Mock:mock>.stubbed_method()

-

+

Unstubbing multiple methods.

-

+
multiplier.unstub(:double, :triple)
 
@@ -1116,9 +1116,9 @@ 

diff --git a/docs/Mocha/ObjectMethods.html b/docs/Mocha/ObjectMethods.html index 80c2d19c6..2e26ff746 100644 --- a/docs/Mocha/ObjectMethods.html +++ b/docs/Mocha/ObjectMethods.html @@ -6,7 +6,7 @@ Module: Mocha::ObjectMethods - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -218,21 +218,21 @@

-

Examples:

+

Examples:

-

+

Setting up an expectation on a non-mock object.

-

+

product = Product.new
 product.expects(:save).returns(true)
 assert_equal true, product.save
-

+

Setting up multiple expectations on a non-mock object.

-

+
product = Product.new
 product.expects(valid?: true, save: true)
@@ -445,21 +445,21 @@ 

-

Examples:

+

Examples:

-

+

Setting up a stubbed methods on a non-mock object.

-

+

product = Product.new
 product.stubs(:save).returns(true)
 assert_equal true, product.save
-

+

Setting up multiple stubbed methods on a non-mock object.

-

+
product = Product.new
 product.stubs(valid?: true, save: true)
@@ -664,12 +664,12 @@ 

-

Examples:

+

Examples:

-

+

Stubbing and unstubbing a method on a real (non-mock) object.

-

+

multiplier = Multiplier.new
 multiplier.double(2) # => 4
@@ -679,9 +679,9 @@ 

multiplier.double(2) # => 4

-

+

Unstubbing multiple methods on a real (non-mock) object.

-

+
multiplier.unstub(:double, :triple)
 
@@ -747,9 +747,9 @@ 

diff --git a/docs/Mocha/ParameterMatchers.html b/docs/Mocha/ParameterMatchers.html index be66ee3e3..b10df0388 100644 --- a/docs/Mocha/ParameterMatchers.html +++ b/docs/Mocha/ParameterMatchers.html @@ -6,7 +6,7 @@ Module: Mocha::ParameterMatchers - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -635,12 +635,12 @@

-

Examples:

+

Examples:

-

+

All parameter matchers match.

-

+

object = mock()
 object.expects(:method_1).with(all_of(includes(1), includes(3)))
@@ -648,9 +648,9 @@ 

# no error raised

-

+

One of the parameter matchers does not match.

-

+
object = mock()
 object.expects(:method_1).with(all_of(includes(1), includes(3)))
@@ -746,12 +746,12 @@ 

-

Examples:

+

Examples:

-

+

One parameter matcher matches.

-

+

object = mock()
 object.expects(:method_1).with(any_of(1, 3))
@@ -759,9 +759,9 @@ 

# no error raised

-

+

The other parameter matcher matches.

-

+
object = mock()
 object.expects(:method_1).with(any_of(1, 3))
@@ -769,9 +769,9 @@ 

# no error raised

-

+

Neither parameter matcher matches.

-

+
object = mock()
 object.expects(:method_1).with(any_of(1, 3))
@@ -867,12 +867,12 @@ 

-

Examples:

+

Examples:

-

+

Any parameters will match.

-

+

object = mock()
 object.expects(:method_1).with(any_parameters)
@@ -953,12 +953,12 @@ 

-

Examples:

+

Examples:

-

+

Any object will match.

-

+

object = mock()
 object.expects(:method_1).with(anything)
@@ -1036,12 +1036,12 @@ 

-

Examples:

+

Examples:

-

+

Actual parameter equals expected parameter.

-

+

object = mock()
 object.expects(:method_1).with(equals(2))
@@ -1049,9 +1049,9 @@ 

# no error raised

-

+

Actual parameter does not equal expected parameter.

-

+
object = mock()
 object.expects(:method_1).with(equals(2))
@@ -1149,12 +1149,12 @@ 

-

Examples:

+

Examples:

-

+

Actual URI is equivalent.

-

+

object = mock()
 object.expects(:method_1).with(equivalent_uri('http://example.com/foo?a=1&b=2))
@@ -1162,9 +1162,9 @@ 

# no error raised

-

+

Actual URI is not equivalent.

-

+
object = mock()
 object.expects(:method_1).with(equivalent_uri('http://example.com/foo?a=1&b=2))
@@ -1260,12 +1260,12 @@ 

-

Examples:

+

Examples:

-

+

Actual parameter contains all expected entries.

-

+

object = mock()
 object.expects(:method_1).with(has_entries('key_1' => 1, 'key_2' => 2))
@@ -1273,9 +1273,9 @@ 

# no error raised

-

+

Actual parameter does not contain all expected entries.

-

+
object = mock()
 object.expects(:method_1).with(has_entries('key_1' => 1, 'key_2' => 2))
@@ -1375,12 +1375,12 @@ 

-

Examples:

+

Examples:

-

+

Actual parameter contains expected entry supplied as key and value.

-

+

object = mock()
 object.expects(:method_1).with(has_entry('key_1', 1))
@@ -1388,9 +1388,9 @@ 

# no error raised

-

+

Actual parameter contains expected entry supplied as Hash entry.

-

+
object = mock()
 object.expects(:method_1).with(has_entry('key_1' => 1))
@@ -1398,9 +1398,9 @@ 

# no error raised

-

+

Actual parameter does not contain expected entry supplied as key and value.

-

+
object = mock()
 object.expects(:method_1).with(has_entry('key_1', 1))
@@ -1408,9 +1408,9 @@ 

# error raised, because method_1 was not called with Hash containing entry: 'key_1' => 1

-

+

Actual parameter does not contain expected entry supplied as Hash entry.

-

+

 object = mock()
@@ -1616,12 +1616,12 @@ 

-

Examples:

+

Examples:

-

+

Actual parameter contains entry with expected key.

-

+

object = mock()
 object.expects(:method_1).with(has_key('key_1'))
@@ -1629,9 +1629,9 @@ 

# no error raised

-

+

Actual parameter does not contain entry with expected key.

-

+
object = mock()
 object.expects(:method_1).with(has_key('key_1'))
@@ -1727,12 +1727,12 @@ 

-

Examples:

+

Examples:

-

+

Actual parameter contains entry with expected keys.

-

+

object = mock()
 object.expects(:method_1).with(has_keys(:key_1, :key_2))
@@ -1740,9 +1740,9 @@ 

# no error raised

-

+

Actual parameter does not contain all expected keys.

-

+
object = mock()
 object.expects(:method_1).with(has_keys(:key_1, :key_2))
@@ -1838,12 +1838,12 @@ 

-

Examples:

+

Examples:

-

+

Actual parameter contains entry with expected value.

-

+

object = mock()
 object.expects(:method_1).with(has_value(1))
@@ -1851,9 +1851,9 @@ 

# no error raised

-

+

Actual parameter does not contain entry with expected value.

-

+
object = mock()
 object.expects(:method_1).with(has_value(1))
@@ -1949,12 +1949,12 @@ 

-

Examples:

+

Examples:

-

+

Actual parameter includes all items.

-

+

object = mock()
 object.expects(:method_1).with(includes('foo', 'bar'))
@@ -1962,17 +1962,17 @@ 

# no error raised

-

+

Actual parameter does not include all items.

-

+
object.method_1(['foo', 'baz'])
 # error raised, because ['foo', 'baz'] does not include 'bar'.
-

+

Actual parameter includes item which matches nested matcher.

-

+
object = mock()
 object.expects(:method_1).with(includes(has_key(:key)))
@@ -1980,17 +1980,17 @@ 

# no error raised

-

+

Actual parameter does not include item matching nested matcher.

-

+
object.method_1(['foo', 'bar', {:other_key => 'baz'}])
 # error raised, because no element matches `has_key(:key)` matcher
-

+

Actual parameter is a String including substring.

-

+
object = mock()
 object.expects(:method_1).with(includes('bar'))
@@ -1998,17 +1998,17 @@ 

# no error raised

-

+

Actual parameter is a String not including substring.

-

+
object.method_1('foobaz')
 # error raised, because 'foobaz' does not include 'bar'
-

+

Actual parameter is a Hash including the given key.

-

+
object = mock()
 object.expects(:method_1).with(includes(:bar))
@@ -2016,17 +2016,17 @@ 

# no error raised

-

+

Actual parameter is a Hash without the given key.

-

+
object.method_1({foo: 1, baz: 2})
 # error raised, because hash does not include key 'bar'
-

+

Actual parameter is a Hash with a key matching the given matcher.

-

+
object = mock()
 object.expects(:method_1).with(includes(regexp_matches(/ar/)))
@@ -2034,9 +2034,9 @@ 

# no error raised

-

+

Actual parameter is a Hash no key matching the given matcher.

-

+
object.method_1({'foo' => 1, 'baz' => 3})
 # error raised, because hash does not include a key matching /ar/
@@ -2130,12 +2130,12 @@

-

Examples:

+

Examples:

-

+

Actual parameter is an instance of String.

-

+

object = mock()
 object.expects(:method_1).with(instance_of(String))
@@ -2143,9 +2143,9 @@ 

# no error raised

-

+

Actual parameter is not an instance of String.

-

+
object = mock()
 object.expects(:method_1).with(instance_of(String))
@@ -2243,12 +2243,12 @@ 

-

Examples:

+

Examples:

-

+

Actual parameter is a Integer.

-

+

object = mock()
 object.expects(:method_1).with(is_a(Integer))
@@ -2256,9 +2256,9 @@ 

# no error raised

-

+

Actual parameter is not a Integer.

-

+
object = mock()
 object.expects(:method_1).with(is_a(Integer))
@@ -2356,12 +2356,12 @@ 

-

Examples:

+

Examples:

-

+

Actual parameter is a kind of Integer.

-

+

object = mock()
 object.expects(:method_1).with(kind_of(Integer))
@@ -2369,9 +2369,9 @@ 

# no error raised

-

+

Actual parameter is not a kind of Integer.

-

+
object = mock()
 object.expects(:method_1).with(kind_of(Integer))
@@ -2469,12 +2469,12 @@ 

-

Examples:

+

Examples:

-

+

Actual parameter does not include the value 1.

-

+

object = mock()
 object.expects(:method_1).with(Not(includes(1)))
@@ -2482,9 +2482,9 @@ 

# no error raised

-

+

Actual parameter does include the value 1.

-

+
object = mock()
 object.expects(:method_1).with(Not(includes(1)))
@@ -2580,12 +2580,12 @@ 

-

Examples:

+

Examples:

-

+

Only the two required parameters are supplied and they both match their expected value.

-

+

object = mock()
 object.expects(:method_1).with(1, 2, optionally(3, 4))
@@ -2593,9 +2593,9 @@ 

# no error raised

-

+

Both required parameters and one of the optional parameters are supplied and they all match their expected value.

-

+
object = mock()
 object.expects(:method_1).with(1, 2, optionally(3, 4))
@@ -2603,9 +2603,9 @@ 

# no error raised

-

+

Both required parameters and both of the optional parameters are supplied and they all match their expected value.

-

+
object = mock()
 object.expects(:method_1).with(1, 2, optionally(3, 4))
@@ -2613,9 +2613,9 @@ 

# no error raised

-

+

One of the actual optional parameters does not match the expected value.

-

+
object = mock()
 object.expects(:method_1).with(1, 2, optionally(3, 4))
@@ -2711,12 +2711,12 @@ 

-

Examples:

+

Examples:

-

+

Actual parameter is matched by specified regular expression.

-

+

object = mock()
 object.expects(:method_1).with(regexp_matches(/e/))
@@ -2724,9 +2724,9 @@ 

# no error raised

-

+

Actual parameter is not matched by specified regular expression.

-

+
object = mock()
 object.expects(:method_1).with(regexp_matches(/a/))
@@ -2827,12 +2827,12 @@ 

-

Examples:

+

Examples:

-

+

Actual parameter responds with “FOO” when :upcase is invoked.

-

+

object = mock()
 object.expects(:method_1).with(responds_with(:upcase, "FOO"))
@@ -2840,9 +2840,9 @@ 

# no error raised, because "foo".upcase == "FOO"

-

+

Actual parameter does not respond with “FOO” when :upcase is invoked.

-

+
object = mock()
 object.expects(:method_1).with(responds_with(:upcase, "BAR"))
@@ -2850,9 +2850,9 @@ 

# error raised, because "foo".upcase != "BAR"

-

+

Actual parameter responds with “FOO” when :upcase is invoked and “oof” when :reverse is invoked.

-

+
object = mock()
 object.expects(:method_1).with(responds_with(upcase: "FOO", reverse: "oof"))
@@ -3071,12 +3071,12 @@ 

-

Examples:

+

Examples:

-

+

Actual parameter is YAML equivalent of specified object.

-

+

object = mock()
 object.expects(:method_1).with(yaml_equivalent(1, 2, 3))
@@ -3084,9 +3084,9 @@ 

# no error raised

-

+

Actual parameter is not YAML equivalent of specified object.

-

+
object = mock()
 object.expects(:method_1).with(yaml_equivalent(1, 2, 3))
@@ -3167,9 +3167,9 @@ 

diff --git a/docs/Mocha/ParameterMatchers/AllOf.html b/docs/Mocha/ParameterMatchers/AllOf.html index 027f85299..b5e43e7d7 100644 --- a/docs/Mocha/ParameterMatchers/AllOf.html +++ b/docs/Mocha/ParameterMatchers/AllOf.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::AllOf - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/AnyOf.html b/docs/Mocha/ParameterMatchers/AnyOf.html index f0a801b4b..db986332a 100644 --- a/docs/Mocha/ParameterMatchers/AnyOf.html +++ b/docs/Mocha/ParameterMatchers/AnyOf.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::AnyOf - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/AnyParameters.html b/docs/Mocha/ParameterMatchers/AnyParameters.html index fbcec4772..99f876d60 100644 --- a/docs/Mocha/ParameterMatchers/AnyParameters.html +++ b/docs/Mocha/ParameterMatchers/AnyParameters.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::AnyParameters - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/Anything.html b/docs/Mocha/ParameterMatchers/Anything.html index 618788571..c67f14db3 100644 --- a/docs/Mocha/ParameterMatchers/Anything.html +++ b/docs/Mocha/ParameterMatchers/Anything.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::Anything - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/Base.html b/docs/Mocha/ParameterMatchers/Base.html index 7016c6272..80110e21a 100644 --- a/docs/Mocha/ParameterMatchers/Base.html +++ b/docs/Mocha/ParameterMatchers/Base.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::Base - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -214,12 +214,12 @@

-

Examples:

+

Examples:

-

+

Alternative ways to combine matchers with a logical AND.

-

+

object = mock()
 object.expects(:run).with(all_of(has_key(:foo), has_key(:bar)))
@@ -323,12 +323,12 @@ 

-

Examples:

+

Examples:

-

+

Alternative ways to combine matchers with a logical OR.

-

+

object = mock()
 object.expects(:run).with(any_of(has_key(:foo), has_key(:bar)))
@@ -340,9 +340,9 @@ 

object.run(foo: 'foovalue')

-

+

Using an explicit Equals matcher in combination with #|.

-

+

object.expects(:run).with(equals(1) | equals(2))
 object.run(1) # passes
@@ -423,9 +423,9 @@ 

diff --git a/docs/Mocha/ParameterMatchers/Equals.html b/docs/Mocha/ParameterMatchers/Equals.html index cac10475f..1b77fa222 100644 --- a/docs/Mocha/ParameterMatchers/Equals.html +++ b/docs/Mocha/ParameterMatchers/Equals.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::Equals - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/EquivalentUri.html b/docs/Mocha/ParameterMatchers/EquivalentUri.html index 7048a40ba..b752479cf 100644 --- a/docs/Mocha/ParameterMatchers/EquivalentUri.html +++ b/docs/Mocha/ParameterMatchers/EquivalentUri.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::EquivalentUri - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/HasEntries.html b/docs/Mocha/ParameterMatchers/HasEntries.html index b77c18ada..991da44ac 100644 --- a/docs/Mocha/ParameterMatchers/HasEntries.html +++ b/docs/Mocha/ParameterMatchers/HasEntries.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::HasEntries - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/HasEntry.html b/docs/Mocha/ParameterMatchers/HasEntry.html index 8b290dc1f..b3ae7ee71 100644 --- a/docs/Mocha/ParameterMatchers/HasEntry.html +++ b/docs/Mocha/ParameterMatchers/HasEntry.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::HasEntry - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/HasKey.html b/docs/Mocha/ParameterMatchers/HasKey.html index 30cd44160..72f52e441 100644 --- a/docs/Mocha/ParameterMatchers/HasKey.html +++ b/docs/Mocha/ParameterMatchers/HasKey.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::HasKey - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/HasKeys.html b/docs/Mocha/ParameterMatchers/HasKeys.html index a519827e0..b392ffb5a 100644 --- a/docs/Mocha/ParameterMatchers/HasKeys.html +++ b/docs/Mocha/ParameterMatchers/HasKeys.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::HasKeys - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/HasValue.html b/docs/Mocha/ParameterMatchers/HasValue.html index 19ec55d4f..3b5aa1d85 100644 --- a/docs/Mocha/ParameterMatchers/HasValue.html +++ b/docs/Mocha/ParameterMatchers/HasValue.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::HasValue - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/Includes.html b/docs/Mocha/ParameterMatchers/Includes.html index 2cd5c69a5..2287182af 100644 --- a/docs/Mocha/ParameterMatchers/Includes.html +++ b/docs/Mocha/ParameterMatchers/Includes.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::Includes - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/InstanceOf.html b/docs/Mocha/ParameterMatchers/InstanceOf.html index 6de80f82f..3cc82f113 100644 --- a/docs/Mocha/ParameterMatchers/InstanceOf.html +++ b/docs/Mocha/ParameterMatchers/InstanceOf.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::InstanceOf - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/IsA.html b/docs/Mocha/ParameterMatchers/IsA.html index ef1a263b1..ec61af6bf 100644 --- a/docs/Mocha/ParameterMatchers/IsA.html +++ b/docs/Mocha/ParameterMatchers/IsA.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::IsA - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/KindOf.html b/docs/Mocha/ParameterMatchers/KindOf.html index 1d01f7b02..03db8abbb 100644 --- a/docs/Mocha/ParameterMatchers/KindOf.html +++ b/docs/Mocha/ParameterMatchers/KindOf.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::KindOf - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/Not.html b/docs/Mocha/ParameterMatchers/Not.html index 826599836..9799d76f8 100644 --- a/docs/Mocha/ParameterMatchers/Not.html +++ b/docs/Mocha/ParameterMatchers/Not.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::Not - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/Optionally.html b/docs/Mocha/ParameterMatchers/Optionally.html index bd0b6e732..12c0d4cf5 100644 --- a/docs/Mocha/ParameterMatchers/Optionally.html +++ b/docs/Mocha/ParameterMatchers/Optionally.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::Optionally - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/RegexpMatches.html b/docs/Mocha/ParameterMatchers/RegexpMatches.html index 682b909ba..32c9b6a46 100644 --- a/docs/Mocha/ParameterMatchers/RegexpMatches.html +++ b/docs/Mocha/ParameterMatchers/RegexpMatches.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::RegexpMatches - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/RespondsWith.html b/docs/Mocha/ParameterMatchers/RespondsWith.html index f36a61458..1e0dda3c9 100644 --- a/docs/Mocha/ParameterMatchers/RespondsWith.html +++ b/docs/Mocha/ParameterMatchers/RespondsWith.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::RespondsWith - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/ParameterMatchers/YamlEquivalent.html b/docs/Mocha/ParameterMatchers/YamlEquivalent.html index 92f5487c1..ea130e95d 100644 --- a/docs/Mocha/ParameterMatchers/YamlEquivalent.html +++ b/docs/Mocha/ParameterMatchers/YamlEquivalent.html @@ -6,7 +6,7 @@ Class: Mocha::ParameterMatchers::YamlEquivalent - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -135,9 +135,9 @@

Methods inherited from - Generated on Wed Jul 24 12:38:12 2024 by + Generated on Wed Oct 23 10:44:34 2024 by yard - 0.9.36 (ruby-3.2.0). + 0.9.37 (ruby-3.2.0). diff --git a/docs/Mocha/Sequence.html b/docs/Mocha/Sequence.html index c2d0c597b..eea18008a 100644 --- a/docs/Mocha/Sequence.html +++ b/docs/Mocha/Sequence.html @@ -6,7 +6,7 @@ Class: Mocha::Sequence - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -131,9 +131,9 @@

Overview

diff --git a/docs/Mocha/StateMachine.html b/docs/Mocha/StateMachine.html index bfec65a9a..baac8b9c7 100644 --- a/docs/Mocha/StateMachine.html +++ b/docs/Mocha/StateMachine.html @@ -6,7 +6,7 @@ Class: Mocha::StateMachine - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -664,9 +664,9 @@

diff --git a/docs/Mocha/StateMachine/State.html b/docs/Mocha/StateMachine/State.html index 8cfeb2486..304134bfd 100644 --- a/docs/Mocha/StateMachine/State.html +++ b/docs/Mocha/StateMachine/State.html @@ -6,7 +6,7 @@ Class: Mocha::StateMachine::State - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -130,9 +130,9 @@

Overview

diff --git a/docs/Mocha/StateMachine/StatePredicate.html b/docs/Mocha/StateMachine/StatePredicate.html index 0af81ff35..cc248aaa9 100644 --- a/docs/Mocha/StateMachine/StatePredicate.html +++ b/docs/Mocha/StateMachine/StatePredicate.html @@ -6,7 +6,7 @@ Class: Mocha::StateMachine::StatePredicate - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -126,9 +126,9 @@

Direct Known Subclasses

diff --git a/docs/Mocha/StubbingError.html b/docs/Mocha/StubbingError.html index 80bd554cc..5cccd87f0 100644 --- a/docs/Mocha/StubbingError.html +++ b/docs/Mocha/StubbingError.html @@ -6,7 +6,7 @@ Class: Mocha::StubbingError - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -132,9 +132,9 @@

Overview

diff --git a/docs/_index.html b/docs/_index.html index 86f763540..d931ff3e7 100644 --- a/docs/_index.html +++ b/docs/_index.html @@ -4,7 +4,7 @@ - Mocha 2.4.5 + Mocha 2.5.0 @@ -52,7 +52,7 @@
-

Mocha 2.4.5

+

Mocha 2.5.0

Alphabetic Index

@@ -508,9 +508,9 @@

Namespace Listing A-Z

diff --git a/docs/class_list.html b/docs/class_list.html index 77f9b3eb2..7ae02427a 100644 --- a/docs/class_list.html +++ b/docs/class_list.html @@ -1,5 +1,5 @@ - + @@ -38,12 +38,15 @@

Class List

- + diff --git a/docs/css/full_list.css b/docs/css/full_list.css index fa3598242..6eef5e4a0 100644 --- a/docs/css/full_list.css +++ b/docs/css/full_list.css @@ -20,8 +20,8 @@ h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } #content.insearch #noresults { margin-left: 7px; } li.collapsed ul { display: none; } li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } -li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; } -li { color: #888; cursor: pointer; } +li.collapsed a.toggle { cursor: default; background-position: top left; } +li { color: #666; cursor: pointer; } li.deprecated { text-decoration: line-through; font-style: italic; } li.odd { background: #f0f0f0; } li.even { background: #fafafa; } @@ -47,7 +47,7 @@ li small { display: block; font-size: 0.8em; } li small:before { content: ""; } li small:after { content: ""; } li small.search_info { display: none; } -#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; } +#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #666; padding-left: 0; padding-right: 24px; } #content.insearch #search { background-position: center right; } #search input { width: 110px; } diff --git a/docs/css/style.css b/docs/css/style.css index eb0dbc86f..f169a6518 100644 --- a/docs/css/style.css +++ b/docs/css/style.css @@ -82,6 +82,11 @@ body { #search { display: none; } } +@media (max-width: 320px) { + body { height: 100%; overflow: hidden; overflow-wrap: break-word; } + #main { height: 100%; overflow: auto; } +} + #main img { max-width: 100%; } h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } @@ -106,6 +111,7 @@ h2 small a { position: relative; padding: 2px 7px; } +a { font-weight: 550; } .clear { clear: both; } .inline { display: inline; } .inline p:first-child { display: inline; } diff --git a/docs/file.COPYING.html b/docs/file.COPYING.html index c706249af..9c76eec29 100644 --- a/docs/file.COPYING.html +++ b/docs/file.COPYING.html @@ -6,7 +6,7 @@ File: COPYING - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -63,9 +63,9 @@ diff --git a/docs/file.MIT-LICENSE.html b/docs/file.MIT-LICENSE.html index d5ce09fab..017f41a0f 100644 --- a/docs/file.MIT-LICENSE.html +++ b/docs/file.MIT-LICENSE.html @@ -6,7 +6,7 @@ File: MIT-LICENSE - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -67,9 +67,9 @@ diff --git a/docs/file.README.html b/docs/file.README.html index a8192028d..be12498bd 100644 --- a/docs/file.README.html +++ b/docs/file.README.html @@ -6,7 +6,7 @@ File: README - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -178,13 +178,7 @@
Other Test Framework

Known Issues

    -
  • In Mocha v1.10.0 an undocumented feature of API#mock, API#stub & API#stub_everything was changed. Previously when these methods were passed a single symbol, they returned a mock object that responded to the method identified by the symbol. Now Passing a single symbol is equivalent to passing a single string, i.e. it now defines the 'name' of the mock object.
  • -
  • In Mocha v1.2.0 there is a scenario where stubbing a class method originally defined in a module hangs the Ruby interpreter due to a bug in Ruby v2.3.1. See #272. This was fixed in Mocha v1.2.1.
  • -
  • Since v1.1.0 Mocha has used prepended modules internally for stubbing methods. There is an obscure Ruby bug in many (but not all) versions of Ruby between v2.0 & v2.3 which under certain circumstances may cause your Ruby interpreter to hang. See the Ruby bug report for more details. The bug has been fixed in Ruby v2.3.3 & v2.4.0.
  • -
  • Stubbing an aliased class method, where the original method is defined in a module that's used to extend the class doesn't work in Ruby 1.8.x. See stub_method_defined_on_module_and_aliased_test.rb for an example of this behaviour.
  • -
  • 0.13.x versions cause a harmless, but annoying, deprecation warning when used with Rails 3.2.0-3.2.12, 3.1.0-3.1.10 & 3.0.0-3.0.19.
  • -
  • 0.11.x versions don't work with Rails 3.2.13 (TypeError: superclass mismatch for class ExpectationError). See #115.
  • -
  • Versions 0.10.2, 0.10.3 & 0.11.0 of the Mocha gem were broken. Please do not use these versions.
  • +
  • Prior to v1.15.0 (when support for Ruby v1.8 was dropped), stubbing an aliased class method where the original method is defined in a module that's used to extend the class doesn't work in Ruby v1.8. See test/acceptance/stub_method_defined_on_module_and_aliased_test.rb for an example of this behaviour.

Usage

@@ -436,9 +430,9 @@

License

diff --git a/docs/file.RELEASE.html b/docs/file.RELEASE.html index 6c73b9b30..e4931a0ab 100644 --- a/docs/file.RELEASE.html +++ b/docs/file.RELEASE.html @@ -6,7 +6,7 @@ File: RELEASE - — Mocha 2.4.5 + — Mocha 2.5.0 @@ -59,6 +59,23 @@

Release Notes

+

2.5.0

+ +

External changes

+ +
    +
  • Add metadata to gem specification, including changelog_uri (#608, eb1b8ea2) - thanks to @mattbrictson
  • +
  • Fix warnings in Ruby v3.4 (#672, #669) - thanks to @radville for reporting
  • +
  • Add warnings & notes about regressions, known issues, etc to release notes (#675, #676 & #677) - thanks to @davidstosik
  • +
+ +

Internal changes

+ +
    +
  • Fix jaro_winkler compilation errors on MacOS (5c7d14cb)
  • +
  • Fix typos in IncludesTest test names (6fb5a5a6)
  • +
+

2.4.5

External changes

@@ -75,6 +92,12 @@

External changes

  • Fix regression when method expecting Hash parameter or keyword arguments is invoked with no arguments (#662, #663) - thanks to @vlad-pisanov for reporting
  • +

    WARNING: This release includes a regression:

    + +
      +
    • A NoMethodError was raised when a stubbed method was expecting a Hash, but was invoked with an instance of ActionController::Parameters. See #662 for the report and #664 for the fix which was released in v2.4.5.
    • +
    +

    2.4.3

    External changes

    @@ -83,6 +106,13 @@

    External changes

  • Fix regression when matching Hash parameter or keyword arguments (#657, #660) - thanks to @josesei for reporting and testing
  • +

    WARNING: This release inadvertently introduced a couple of regressions:

    + +
      +
    • A NoMethodError was raised when a stubbed method was expecting a Hash, but was invoked with no arguments, e.g. with C.expects(:foo).with(bar: 42) and invoking C.expects(:foo). See #662 for the report and #663 for the fix which was released in v2.4.4.
    • +
    • A NoMethodError was raised when a stubbed method was expecting a Hash, but was invoked with an instance of ActionController::Parameters. See #662 for the report and #664 for the fix which was released in v2.4.5.
    • +
    +

    2.4.2

    External changes

    @@ -91,6 +121,12 @@

    External changes

  • Don't trust Object#is_a? in presence of mock objects (#656) - thanks to @casperisfine
  • +

    WARNING: This release includes a regression:

    + +
      +
    • Keyword argument and top-level Hash matching became more relaxed than intended, e.g. mock.expects(:method).with(key: "value") accepted mock.method(key: "value", key2: "value") when it should not have done. See #657 & #675 for the reports and #660 for the fix which was released in v2.4.3.
    • +
    +

    2.4.1

    External changes

    @@ -106,6 +142,12 @@

    Internal changes

  • Change #to_matcher method to use keyword arguments (3b60b7df, #655)
  • +

    WARNING: This release includes a regression:

    + +
      +
    • Keyword argument and top-level Hash matching became more relaxed than intended, e.g. mock.expects(:method).with(key: "value") accepted mock.method(key: "value", key2: "value") when it should not have done. See #657 & #675 for the reports and #660 for the fix which was released in v2.4.3.
    • +
    +

    2.4.0

    External changes

    @@ -116,8 +158,12 @@

    External changes

    Internal changes

    +

    WARNING: This release includes a couple of regressions:

    +
      -
    • Improvements to #mocha_inspect unit tests (#650)
    • +
    • Nested parameter matching for keyword arguments became more relaxed than intended, e.g. mock.expects(:method).with(has_entry(:k1, k2: 'v2')) accepted mock.method(k1: { k2: 'v2', k3: 'v3' }) when it should not have done. See #654 for the report and #655 for the fix which was released in v2.4.1.
    • +
    • Keyword argument and top-level Hash matching became more relaxed than intended, e.g. mock.expects(:method).with(key: "value") accepted mock.method(key: "value", key2: "value") when it should not have done. See #657 & #675 for the reports and #660 for the fix which was released in v2.4.3.

    • +
    • Improvements to #mocha_inspect unit tests (#650)

    2.3.0

    @@ -128,6 +174,13 @@

    External changes

  • Fix nested parameter matching for keyword arguments (f94e2504, #648) - thanks to @CodingAnarchy for reporting
  • +

    WARNING: This release inadvertently introduced a couple of regressions:

    + +
      +
    • Nested parameter matching for keyword arguments became more relaxed than intended, e.g. mock.expects(:method).with(has_entry(:k1, k2: 'v2')) accepted mock.method(k1: { k2: 'v2', k3: 'v3' }) when it should not have done. See #654 for the report and #655 for the fix which was released in v2.4.1.
    • +
    • Keyword argument and top-level Hash matching became more relaxed than intended, e.g. mock.expects(:method).with(key: "value") accepted mock.method(key: "value", key2: "value") when it should not have done. See #657 & #675 for the reports and #660 for the fix which was released in v2.4.3.
    • +
    +

    2.2.0

    External changes

    @@ -469,6 +522,12 @@

    1.10.0

  • Add documentation about an undocumented feature of API#mock, API#stub & API#stub_everything being changed (7ed2e4e7, d30c1717)
  • +

    WARNING: This release inadvertently changed some undocumented behaviour:

    + +
      +
    • An undocumented feature of API#mock, API#stub & API#stub_everything was changed. Previously when these methods were passed a single symbol, they returned a mock object that responded to the method identified by the symbol. Now Passing a single symbol is equivalent to passing a single string, i.e. it now defines the 'name' of the mock object.
    • +
    +

    1.10.0.beta.1

      @@ -639,6 +698,12 @@

      1.2.0

    • Add known issue for Ruby v1.8 to README - thanks to @chrisroos (2c642096)
    +

    WARNING: This release inadvertently introduced the possibility of causing the Ruby interpreter to hang:

    + +
      +
    • There is a scenario where stubbing a class method originally defined in a module hangs the Ruby interpreter due to a bug in Ruby v2.3.1. See #272. This was fixed in Mocha v1.2.1.
    • +
    +

    1.1.0

      @@ -649,6 +714,12 @@

      1.1.0

    • Fix typos in docs. Thanks to @10io
    +

    WARNING: This release inadvertently introduced the possibility of causing the Ruby interpreter to hang:

    + +
      +
    • From this release onwards, prepended modules have been used internally for stubbing methods. There is an obscure Ruby bug in many (but not all) versions of Ruby between v2.0 & v2.3 which under certain circumstances may cause your Ruby interpreter to hang. See the Ruby bug report for more details. The bug has been fixed in Ruby v2.3.3 & v2.4.0.
    • +
    +

    1.0.0

    External changes

    @@ -724,6 +795,12 @@

    0.13.3

  • Updates to README about Rails compatibility.
  • +

    NOTE: This release inadvertently caused deprecation warnings in some contexts:

    + +
      +
    • When used with Rails v3.2.0-v3.2.12, v3.1.0-v3.1.10 & v3.0.0-v3.0.19.
    • +
    +

    0.13.2

      @@ -736,6 +813,12 @@

      0.13.2

    • Make documentation example consistent with other examples.
    +

    NOTE: This release inadvertently caused deprecation warnings in some contexts:

    + +
      +
    • When used with Rails v3.2.0-v3.2.12, v3.1.0-v3.1.10 & v3.0.0-v3.0.19.
    • +
    +

    0.13.1

      @@ -743,6 +826,12 @@

      0.13.1

    • Allow deprecation :debug mode to be switched on from MOCHA_OPTIONS environment variable.
    +

    NOTE: This release inadvertently caused deprecation warnings in some contexts:

    + +
      +
    • When used with Rails v3.2.0-v3.2.12, v3.1.0-v3.1.10 & v3.0.0-v3.0.19.
    • +
    +

    0.13.0

      @@ -758,6 +847,12 @@

      0.13.0

    • Make deprecation warnings more prominent.
    +

    NOTE: This release inadvertently caused deprecation warnings in some contexts:

    + +
      +
    • When used with Rails v3.2.0-v3.2.12, v3.1.0-v3.1.10 & v3.0.0-v3.0.19.
    • +
    +

    0.12.7

    +

    WARNING: This release inadvertently included a Rails compatibility issue:

    + +
      +
    • TypeError: superclass mismatch for class ExpectationError raised when using Rails v3.2.13. See #115.
    • +
    +

    0.11.3

    • Fix for #78 i.e. alias Object#method as Object#method, not Object#method_ which already exists as another Ruby method.
    +

    WARNING: This release inadvertently included a Rails compatibility issue:

    + +
      +
    • TypeError: superclass mismatch for class ExpectationError raised when using Rails v3.2.13. See #115.
    • +
    +

    0.11.2

    • Rails has a Request class which defines its own #method method. This broke the new mechanism for stubbing a method. This release includes a slightly modified version of fix #77 provided by @sikachu. See https://github.com/rails/rails/pull/5907 for further info.
    +

    WARNING: This release inadvertently included a Rails compatibility issue:

    + +
      +
    • TypeError: superclass mismatch for class ExpectationError raised when using Rails v3.2.13. See #115.
    • +
    +

    0.11.1

    • In Ruby 1.8.7 methods accepting a block parameter were incorrectly restored without the block parameter after being stubbed. Fix for #76.
    +

    WARNING: This release inadvertently included a Rails compatibility issue:

    + +
      +
    • TypeError: superclass mismatch for class ExpectationError raised when using Rails v3.2.13. See #115.
    • +
    +

    0.11.0

      @@ -854,6 +973,14 @@

      0.11.0

    • Provide a way to run multiple tests within a single acceptance test method.
    +

    WARNING: This release inadvertently included a significant bug - please do not use it!

    + +

    WARNING: This release inadvertently introduced a Rails compatibility issue:

    + +
      +
    • TypeError: superclass mismatch for class ExpectationError raised when using Rails v3.2.13. See #115.
    • +
    +

    0.10.5

      @@ -881,12 +1008,16 @@

      0.10.3

    • Fix for issue #57. Gem::Requirement#=~ was only added in rubygems v1.8.0, but Object#=~ means the result of various monkey-patching checks is always false/nil for earlier versions of rubygems. However, the method it aliases #satisfied_by? has existed since Gem::Dependency was extracted from Gem::Version in rubygems v0.9.4.4, so it's much safer to use that. Thanks to fguillen for reporting and helping with diagnosis.
    +

    WARNING: This release inadvertently included a significant bug - please do not use it!

    +

    0.10.2

    • Merge pull request #53. Unstubbing a method should not remove expectations for other stubbed methods. Fixes #52. Thanks to saikat.
    +

    WARNING: This release inadvertently included a significant bug - please do not use it!

    +

    0.10.1

      @@ -1340,9 +1471,9 @@

      0.1.1

    diff --git a/docs/file_list.html b/docs/file_list.html index 551b1982b..94cc5875a 100644 --- a/docs/file_list.html +++ b/docs/file_list.html @@ -1,5 +1,5 @@ - + @@ -38,7 +38,10 @@

    File List

    - +
      diff --git a/docs/frames.html b/docs/frames.html index e4c19bbc0..f070c02e7 100644 --- a/docs/frames.html +++ b/docs/frames.html @@ -2,7 +2,7 @@ - Mocha 2.4.5 + Mocha 2.5.0