Hi,
On Thu, Jan 27, 2011 at 21:48, Michael Guterl wrote:
> RSpec::Matchers.define :deliver do |message|
> chain :with do |*args|
> @with = args
> end
>
> match do |mailer|
> mail = double
> mail.should_receive(:deliver)
>
> mailer.should_receive(message).with(*@with).and_return(mai
On Thu, Jan 27, 2011 at 2:05 PM, Michael Guterl wrote:
> On Thu, Jan 27, 2011 at 10:30 AM, David Chelimsky
> wrote:
>>
>> On Jan 27, 2011, at 7:48 AM, Michael Guterl wrote:
>>
>>> We have moved from Rails 2 to 3 and the changing Mailer syntax has
>>> caused us to rewrite some of our specs.
>>>
>
On Thu, Jan 27, 2011 at 10:30 AM, David Chelimsky wrote:
>
> On Jan 27, 2011, at 7:48 AM, Michael Guterl wrote:
>
>> We have moved from Rails 2 to 3 and the changing Mailer syntax has
>> caused us to rewrite some of our specs.
>>
>> In Rails 2:
>>
>> Implementation:
>> Mailer.deliver_job_applicat
On Thu, Jan 27, 2011 at 10:30 AM, David Chelimsky wrote:
>
> On Jan 27, 2011, at 7:48 AM, Michael Guterl wrote:
>
>> We have moved from Rails 2 to 3 and the changing Mailer syntax has
>> caused us to rewrite some of our specs.
>>
>> In Rails 2:
>>
>> Implementation:
>> Mailer.deliver_job_applicat
On Jan 27, 2011, at 7:48 AM, Michael Guterl wrote:
> We have moved from Rails 2 to 3 and the changing Mailer syntax has
> caused us to rewrite some of our specs.
>
> In Rails 2:
>
> Implementation:
> Mailer.deliver_job_application(job.id, user.id)
>
> Spec:
> Mailer.should_receive(:deliver_j
We have moved from Rails 2 to 3 and the changing Mailer syntax has
caused us to rewrite some of our specs.
In Rails 2:
Implementation:
Mailer.deliver_job_application(job.id, user.id)
Spec:
Mailer.should_receive(:deliver_job_application).with(@job.id, @user.id)
---
In Rails 3:
Implementati