"once" not honored?

I’m trying this:

firmware.should_receive(:execute).with(“ATZ”).once.ordered.and_return(AT_OK)
firmware.should_receive(:execute).with(“ATE0V1”).once.ordered.and_return(AT_OK)
firmware.should_receive(:execute).with(“AT+CNUM”).once.and_return(AT_OK)

But rspec does not complain that “AT+CNUM” is never passed as argument.
Bug? Or did I misinterpret the feature “once” ?

NB: I’d love to be able to write firmware.should_receive(“AT+CNUM”) but
that seems to fail on the way the method :“AT+CNUM” is being defined;
which in turn seems something I can only change (quickly) for Ruby 1.9,
namely blocks not accepting implicit blocks as parameter. Any chance of
fixing that?

Bye,
Kero.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs