The legacy :should syntax adds the following methods directly
-to BasicObject so that they are available off of any object.
-Note, however, that this syntax does not always play nice with
-delegate/proxy objects. We recommend you use the non-monkeypatching
-:expect syntax instead.
+
The legacy :should syntax adds the following methods directly to
+BasicObject so that they are available off of any object. Note, however,
+that this syntax does not always play nice with delegate/proxy objects.
+We recommend you use the non-monkeypatching :expect syntax instead.
@@ -116,9 +114,9 @@
Overview
-
+
-
+
@@ -100,12 +100,11 @@
Overview
-
-
The legacy :should syntax adds the any_instance
-to Class. We generally recommend you use the newer
-:expect syntax instead, which allows you to stub any instance
-of a class using allow_any_instance_of(klass) or mock any
-instance using expect_any_instance_of(klass).
+
The legacy :should syntax adds the any_instance to Class.
+We generally recommend you use the newer :expect syntax instead,
+which allows you to stub any instance of a class using
+allow_any_instance_of(klass) or mock any instance using
+expect_any_instance_of(klass).
@@ -152,9 +151,7 @@
-
-
Used to set stubs and message expectations on any instance of a given
-class.
+
Used to set stubs and message expectations on any instance of a given class.
@@ -183,17 +180,14 @@
Note:
-
-
This is only available when you have enabled the should
-syntax.
+
This is only available when you have enabled the should syntax.
-
Used to set stubs and message expectations on any instance of a given
-class. Returns a Recorder, which records messages
-like stub and should_receive for later playback
-on instances of the class.
+class. Returns a Recorder, which records messages like
+stub and should_receive for later playback on instances of the
+class.
@@ -260,9 +254,9 @@
-
+
-
+
@@ -86,8 +86,7 @@
Overview
-
-
Share the top-level RSpec namespace, because we are a core supported
+
Share the top-level RSpec namespace, because we are a core supported
extension.
@@ -118,9 +117,9 @@
Overview
-
+
-
+
@@ -86,11 +86,10 @@
Overview
-
-
Contains top-level utility methods. While this contains a few public
-methods, these are not generally meant to be called from a test or example.
-They exist primarily for integration with test frameworks (such as
-rspec-core).
+
Contains top-level utility methods. While this contains a few
+public methods, these are not generally meant to be called from
+a test or example. They exist primarily for integration with
+test frameworks (such as rspec-core).
@@ -122,8 +121,7 @@
MockExpectationError =
-
-
Raised when a message expectation is not satisfied.
+
Raised when a message expectation is not satisfied.
@@ -138,9 +136,8 @@
ExpiredTestDoubleError =
-
-
Raised when a test double is used after it has been torn down (typically at
-the end of an rspec-core example).
+
Raised when a test double is used after it has been torn
+down (typically at the end of an rspec-core example).
@@ -155,9 +152,7 @@
OutsideOfExampleError =
-
-
Raised when doubles or partial doubles are used outside of the per-test
-lifecycle.
+
Raised when doubles or partial doubles are used outside of the per-test lifecycle.
@@ -172,10 +167,9 @@
MockExpectationAlreadyInvokedError =
-
-
Raised when an expectation customization method (e.g. with,
-and_return) is called on a message expectation which has
-already been invoked.
+
Raised when an expectation customization method (e.g. with,
+and_return) is called on a message expectation which has already been
+invoked.
@@ -190,11 +184,9 @@
CannotSupportArgMutationsError =
-
Deprecated.
-
We no longer raise this error but the constant remains until RSpec 4 for
-SemVer reasons.
+
Deprecated.
We no longer raise this error but the constant remains until
+RSpec 4 for SemVer reasons.
-
Raised for situations that RSpec cannot support due to mutations made
externally on arguments that RSpec is holding onto to use for later
comparisons.
@@ -243,8 +235,7 @@
-
-
Adds an allowance (stub) on subject.
+
Adds an allowance (stub) on subject.
@@ -267,9 +258,7 @@
-
-
Mocks specific configuration, as distinct from
-RSpec.configuration which is core RSpec configuration.
+
Mocks specific configuration, as distinct from RSpec.configuration which is core RSpec configuration.
@@ -292,8 +281,7 @@
-
-
Sets a message expectation on subject.
+
Sets a message expectation on subject.
@@ -316,8 +304,7 @@
-
-
Performs per-test/example setup.
+
Performs per-test/example setup.
@@ -340,9 +327,7 @@
-
-
Cleans up all test double state (including any methods that were redefined
-on partial doubles).
+
Cleans up all test double state (including any methods that were redefined on partial doubles).
@@ -365,8 +350,7 @@
-
-
Verifies any message expectations that were set during the test or example.
+
Verifies any message expectations that were set during the test or example.
@@ -389,8 +373,7 @@
-
-
Call the passed block and verify mocks after it has executed.
+
Call the passed block and verify mocks after it has executed.
@@ -416,8 +399,7 @@
-
-
Adds an allowance (stub) on subject
+
Adds an allowance (stub) on subject
@@ -428,9 +410,7 @@
Examples:
-
-
Defines the implementation of foo on bar, using
-the passed block
+
Defines the implementation of foo on bar, using the passed block
x=0
@@ -450,8 +430,7 @@
—
-
-
the subject to which the message will be added
+
the subject to which the message will be added
@@ -466,8 +445,8 @@
—
-
-
a symbol, representing the message that will be added.
+
a symbol, representing the message that will be
+added.
@@ -484,8 +463,8 @@
—
-
-
a hash of options, :expected_from is used to set the original call site
+
a hash of options, :expected_from is used to set the
+original call site
@@ -503,8 +482,7 @@
-
-
an optional implementation for the allowance
+
an optional implementation for the allowance
@@ -543,9 +521,8 @@
-
-
Mocks specific configuration, as distinct from
-RSpec.configuration which is core RSpec configuration.
+
Mocks specific configuration, as distinct from RSpec.configuration
+which is core RSpec configuration.
@@ -585,8 +562,7 @@
-
-
Sets a message expectation on subject.
+
Sets a message expectation on subject.
@@ -597,9 +573,7 @@
Examples:
-
-
Expect the message foo to receive bar, then call
-it
+
Expect the message foo to receive bar, then call it
a symbol, representing the message that will be expected.
+
a symbol, representing the message that will be
+expected.
@@ -653,8 +626,8 @@
—
-
-
a hash of options, :expected_from is used to set the original call site
+
a hash of options, :expected_from is used to set the
+original call site
@@ -672,8 +645,7 @@
-
-
an optional implementation for the expectation
+
an optional implementation for the expectation
@@ -712,9 +684,8 @@
-
-
Performs per-test/example setup. This should be called before an test or
-example begins.
+
Performs per-test/example setup. This should be called before
+an test or example begins.
@@ -754,10 +725,9 @@
-
-
Cleans up all test double state (including any methods that were redefined
-on partial doubles). This must be called after each example, even
-if an error was raised during the example.
+
Cleans up all test double state (including any methods that were
+redefined on partial doubles). This must be called after
+each example, even if an error was raised during the example.
@@ -801,9 +771,8 @@
-
-
Verifies any message expectations that were set during the test or example.
-This should be called at the end of an example.
+
Verifies any message expectations that were set during the
+test or example. This should be called at the end of an example.
@@ -843,8 +812,7 @@
-
-
Call the passed block and verify mocks after it has executed. This allows
+
Call the passed block and verify mocks after it has executed. This allows
mock usage in arbitrary places, such as a before(:all) hook.
@@ -893,9 +861,9 @@
-
+
-
+
@@ -100,23 +100,22 @@
Overview
-
-
Wrapper for matching arguments against a list of expected values. Used by
+
Wrapper for matching arguments against a list of expected values. Used by
the with method on a MessageExpectation:
Can also be used directly to match the contents of any Array.
-This enables 3rd party mocking libs to take advantage of rspec's
-argument matching without using the rest of rspec-mocks.
+
Can also be used directly to match the contents of any Array. This
+enables 3rd party mocking libs to take advantage of rspec's argument
+matching without using the rest of rspec-mocks.