[mocha-developer] using expects with [] (for Hash and Array)

Jamie Macey jamie.macey at gmail.com
Wed Nov 15 16:07:59 EST 2006

On 11/15/06, Jeremy Burks <jeremy.burks at gmail.com> wrote:
> First off, thanks for the great library.
> Is there a way setup expects with this:
>     runtime_options[:property] = properties_option_string

This is probably equivalent to

    runtime_options.[]=(:property, properties_option_string)

in which case, this should work:

    runtime_options.expects(:[]=).with(:property, properties_option_string)

- Jamie

More information about the mocha-developer mailing list