Re: [rspec-users] modelling roles and responsibilities

2011-12-09 Thread Nikolay Sturm
* David Chelimsky [2011-12-07]: > Nikolay - just because they're shareable doesn't mean they have to be > shared :) As Pat suggests, you can use them to specify a subset of a > single object's API. That said, one goal of thinking of roles is code > that is easy to extend thanks to polymorphism. You

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

2011-12-09 Thread Morten Møller Riis
How about this? paypal_error = mock('paypal_error') paypal_error.should_receive(:deliver) Notifier.should_receive(:paypal_error).with(@errors, hash_including({ :post_id => @post.id, :user_id => @user.id,

Re: [rspec-users] Strange time reporting

2011-12-09 Thread Rodrigo Rosenfeld Rosas
Em 09-12-2011 15:14, Rodrigo Rosenfeld Rosas escreveu: While running some specs of a new fresh Rails 3.1 project with latest Rspec, I'm getting some strange time reporting (using --drb and spork): Finished in 731.67 seconds 10 examples, 0 failures But it actually run "time rake" in less than 2

[rspec-users] Strange time reporting

2011-12-09 Thread Rodrigo Rosenfeld Rosas
While running some specs of a new fresh Rails 3.1 project with latest Rspec, I'm getting some strange time reporting (using --drb and spork): Finished in 731.67 seconds 10 examples, 0 failures But it actually run "time rake" in less than 2s. "time rspec" runs in about 0.2s. The finished time

Re: [rspec-users] Strange time reporting

2011-12-09 Thread David Chelimsky
On Dec 9, 2011, at 11:15 AM, Rodrigo Rosenfeld Rosas wrote: > Em 09-12-2011 15:14, Rodrigo Rosenfeld Rosas escreveu: >> While running some specs of a new fresh Rails 3.1 project with latest Rspec, >> I'm getting some strange time reporting (using --drb and spork): >> >> Finished in 731.67 seco

Re: [rspec-users] Strange time reporting

2011-12-09 Thread Rodrigo Rosenfeld Rosas
Em 09-12-2011 15:43, David Chelimsky escreveu: On Dec 9, 2011, at 11:15 AM, Rodrigo Rosenfeld Rosas wrote: Em 09-12-2011 15:14, Rodrigo Rosenfeld Rosas escreveu: While running some specs of a new fresh Rails 3.1 project with latest Rspec, I'm getting some strange time reporting (using --drb

Re: [rspec-users] Strange time reporting

2011-12-09 Thread Rodrigo Rosenfeld Rosas
Em 09-12-2011 16:31, Rodrigo Rosenfeld Rosas escreveu: Em 09-12-2011 15:43, David Chelimsky escreveu: On Dec 9, 2011, at 11:15 AM, Rodrigo Rosenfeld Rosas wrote: Em 09-12-2011 15:14, Rodrigo Rosenfeld Rosas escreveu: While running some specs of a new fresh Rails 3.1 project with latest Rspe

Re: [rspec-users] Strange time reporting

2011-12-09 Thread David Chelimsky
On Fri, Dec 9, 2011 at 12:31 PM, Rodrigo Rosenfeld Rosas wrote: > Em 09-12-2011 15:43, David Chelimsky escreveu: > >> On Dec 9, 2011, at 11:15 AM, Rodrigo Rosenfeld Rosas >>  wrote: >> >>> Em 09-12-2011 15:14, Rodrigo Rosenfeld Rosas escreveu: While running some specs of a new fresh Rail