gocardless/statesman — pull request #82 by isaacseymour (2014-09-13 14:11:46+00:00)
Title: Allow adding callbacks against multiple to states

@jackfranklin This is against your open PR as I didn't want to commit directly to it without asking you first, so please don't merge #81 before this one is merged/closed. Could you review this, then Andy can just review the one PR?

Allows `options[:to]` to be an array in `add_callback`, as per #80

* if `to` is `nil` or `[]` it adds one callback with `to: nil` as before
* if `to` is a string/symbol it adds one callback to that state
* if `to` is an array it adds callbacks to each of those states.

Also DRYed the specs a bit, with shared examples for `add_callback` succeeding/failing, and bumped Rubocop to 0.26 as everyone loves new cops.

I hope this is what you were asking for @pacso ?