Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StubCall is no longer allowing implicit return values, will only accept a return method #281

Open
charlie-abbott-deltatre opened this issue May 27, 2024 · 1 comment

Comments

@charlie-abbott-deltatre

On the latest Rooibos release 5.12.0, stepping into the m.stubCall method:

function stubCall(invocation as dynamic, stubOrReturnValue = invalid as dynamic, functionName = "" as string) as object

The stubOrReturnValue param throws an error if it's not defined as a function: .endsWith("Function").

Based on the way this param is named, it appears to be a regression?

@disc7
Copy link

disc7 commented May 29, 2024

Here's a demo of the issue:

m.stubCall via inline function is working
https://github.com/disc7/rooibosDemo/blob/main/tests/source/tests/Examples.spec.bs#L25

m.stubCall via return value is not working:
https://github.com/disc7/rooibosDemo/blob/main/tests/source/tests/Examples.spec.bs#L33

Clone or download the zip of the project, c&p the vscode_sample files and define a .env in root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants