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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -