ruby - Chain should_receive Possible? -
is there more terse way write rspec code?
mailer = double adminmailer.should_receive(:request_failed).with(@request).and_return(mailer) mailer.should_receive(:deliver)
i'm envisioning this:
adminmailer .should_receive(:request_failed) .with(@request) .should_receive(:deliver)
i don't think it's possible, if is, wouldn't recommend it. specs should show expecting of code, , first example quite succinctly!
Comments
Post a Comment