krisleech/wisper — pull request #73 by krisleech (2014-08-15 23:14:33+00:00)
Title: add `with` option to rspec matcher

This is a potential follow on to the rspec matcher fix which adds a `with` option to assert on the arguments broadcast. If does not use chained matchers (`expect { service.execute }.to broadcast(:event_name).with(arg1, arg2)`) because this requires the block to be yielded twice, once for `broadcast` matcher and once for the `with` matcher. This problem is potentially fixed in rspec 3.1 (not yet beta). So for now while not very rspec-y we can have an optional inline `with` option on the `broadcast` matcher.