Re: [rspec-users] problem setting expectation for test with delayed::job

2011-12-01 Thread Patrick J. Collins
> In rspec-mocks, when you say Klass.stub(:new), Klass.new returns a proxy, not > an instance of the Klass. I'm pretty sure the same is true of mocha. Ok-- I guess I wasn't realizing that Klass.expects(:new) was actually stubbing the class.. I was thinking it was doing something like making a dup

Re: [rspec-users] problem setting expectation for test with delayed::job

2011-12-01 Thread David Chelimsky
On Dec 1, 2011, at 6:34 PM, Patrick J. Collins wrote: > I've got something like this: > > # post_observer.rb > > after_create > # ...stuff > Delayed::Job.enqueue(PostSharer.new(post, post.user)) > end > > ... > > # post_sharer.rb > > class PostSharer < Struct.new(:post, user) > > def perf