AutoworkStubParams๏ƒ

Experimental: Some methods may not be implemented and may be changed in future versions.

Inherits: RefCounted < Object

Fluent configuration object for defining stub behavior.

Description๏ƒ

The AutoworkStubParams class provides a fluent API for defining conditional stub behavior in tests.

It is used by AutoworkStubber to describe how a method should behave when called, including return values, argument matching, or whether the original method should be executed.

Methods๏ƒ

AutoworkStubParams

to_call_super()

AutoworkStubParams

to_do_nothing()

AutoworkStubParams

to_return(value: Variant)

AutoworkStubParams

when_passed(args: Variant)


Method Descriptions๏ƒ

AutoworkStubParams to_call_super() ๐Ÿ”—

Configures the stub to call the original method implementation.

When applied, the stub will allow execution of the original method instead of fully replacing it.

This is useful for partial overrides or behavior extension.


AutoworkStubParams to_do_nothing() ๐Ÿ”—

Configures the stub to do nothing when the method is called.

The method call is intercepted and suppressed, and no return value or original implementation is executed.


AutoworkStubParams to_return(value: Variant) ๐Ÿ”—

Configures the stub to return a specific value.

When the method is called, the provided value is returned instead of executing the original implementation.


AutoworkStubParams when_passed(args: Variant) ๐Ÿ”—

Restricts the stub to only apply when specific arguments are passed.

The stub will only be triggered if the method call matches the provided args.

This allows fine-grained control over conditional behavior.