[rspec-users] Expecting multiple changes (chaining)

2011-12-08 Thread Jo Liss
Hi RSpec list, I have a question about the "expect { ... }.to change" construct (https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers/expect-change): Is there an idiomatic way to test for multiple changes (i.e. chaining)? Right now I'm doing expect { expect {

Re: [rspec-users] Expecting multiple changes (chaining)

2011-12-08 Thread David Chelimsky
On Thu, Dec 8, 2011 at 3:30 PM, Jo Liss wrote: > Hi RSpec list, > > I have a question about the "expect { ... }.to change" construct > (https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers/expect-change): > > Is there an idiomatic way to test for multiple changes (i.e. chainin

[rspec-users] how to test arguments going into a mailer method?

2011-12-08 Thread Patrick J. Collins
Hi, So I am not really interested in testing the content of the actual body of an outgoing email. I trust that Rails' internal mechanisms work, however recently I came across some code that did something that I did want to test: --- class PaypalProcessor def send_email Notifier.paypal_er