active_interaction-extras
active_interaction-extras copied to clipboard
RSpec delay methods execute interaction
When using any of the RSpec helper methods for delayed jobs (allow_to_delay_run, allow_to_delay_execute, expect_to_delay_run, expect_not_to_run_delayed, expect_to_not_run_delayed, and expect_to_delay_execute), the interaction is actually run, unlike the non-delayed helper methods.
Testing this assumes that issue #18 has been resolved. Creating tests for these methods results in:
RuntimeError:
This should never be called
Before producing a PR, I'd like to confirm that the expected behaviour is that the delay methods also stub the instance so the execute method isn't run.
Before producing a PR, I'd like to confirm that the expected behaviour is that the delay methods also stub the instance so the execute method isn't run.
Yes, looking at the code, it stubs execution. I believe my reasoning for stubbing was to mock dependencies to isolate test.