You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps get at the block somehow and verify things about it (what happens when you call it, etc).
I find some some code that passes a block to a method, and inside the block is a string. I'd like to verify that with a spec before I start changing it.
The text was updated successfully, but these errors were encountered:
No, there isn't a built-in way to do this. I don't know if I plan on adding support for this any time soon, but it's an interesting use case. The workaround you came up with looks like the best solution so far (although you need to say block.call and not simply block).
It's also curious to me why it doesn't work like this instead:
Perhaps get at the block somehow and verify things about it (what happens when you call it, etc).
I find some some code that passes a block to a method, and inside the block is a string. I'd like to verify that with a spec before I start changing it.
The text was updated successfully, but these errors were encountered: