slack-ruby / slack-ruby-bot

The easiest way to write a Slack bot in Ruby.
MIT License
1.12k stars 187 forks source link

`respond_with_slack_message` only works if bot makes a single response #135

Closed aturkewi closed 7 years ago

aturkewi commented 7 years ago

I am currently building a project in such a way that after a bot responds, it kicks of another task that may return a second response. I'm able to use respond_with_slack_message(/(response1regex|response2regex)/), but the tests still fail because:

expected: 1 time with arguments: ({:channel=>"channel", :text=>/.*/})
received: 2 times with arguments: ({:channel=>"channel", :text=>/.*/})

It would be nice to be able to have this matcher be able to receive multiple messages.