zooniverse / talk-api

Apache License 2.0
6 stars 0 forks source link

Rails 5.1 test fixes - Stubbing adapter method and model methods for mocked objects #367

Closed yuenmichelle1 closed 2 weeks ago

yuenmichelle1 commented 3 weeks ago

See eg failing spec result: `TagExportWorker behaves like a data export worker #perform should set the data request started Failure/Error: data_request.finished!

<Double (anonymous)> received unexpected message :- with (#<Double (anonymous)>)`

This happens because the mocked data_request does not recognize the model's enum method finished!, we therefore have to allow the test double to receive the enum method .