mercredi 16 octobre 2019

Ruby Rspec should_not_receive not working

For this below code snippet:

@by_hidden.should_not_receive(:by_limit).with(100).and_return(@by_limit)

I am facing error as

@by_hidden.should_not_receive(:by_limit).with(100).and_return(@by_limit)
       (Double Object).by_limit(100)
           expected: 1 time with arguments: (100)
           received: 0 times with arguments: (100)

Any information on this shall be appreciated.

Aucun commentaire:

Enregistrer un commentaire