Re: [rspec-users] Can you explain this code to me?

2008-02-08 Thread Pito Salas
Thanks all for excellent pointers! On Feb 8, 2008 2:21 AM, Jarkko Laine <[EMAIL PROTECTED]> wrote: > On 8.2.2008, at 1.26, Pito Salas wrote: > > > I am experimenting with the restful-authentication plug in and I see > > that it has generated an rspec encantation which I had not seen > > before: >

Re: [rspec-users] Can you explain this code to me?

2008-02-07 Thread Jarkko Laine
On 8.2.2008, at 1.26, Pito Salas wrote: > I am experimenting with the restful-authentication plug in and I see > that it has generated an rspec encantation which I had not seen > before: > > it 'allows signup' do >lambda do > create_user > response.should be_redirect >end.should

Re: [rspec-users] Can you explain this code to me?

2008-02-07 Thread Pat Maddox
On Feb 7, 2008 3:40 PM, Bira <[EMAIL PROTECTED]> wrote: > On Feb 7, 2008 9:26 PM, Pito Salas <[EMAIL PROTECTED]> wrote: > > > What does the combination of a lambda and a .should mean? > > I'm new to the list, but I think I can answer that :). > > >From what I know, it means that RSpec will run the

Re: [rspec-users] Can you explain this code to me?

2008-02-07 Thread David Chelimsky
On Feb 7, 2008 5:26 PM, Pito Salas <[EMAIL PROTECTED]> wrote: > I am experimenting with the restful-authentication plug in and I see > that it has generated an rspec encantation which I had not seen > before: > > it 'allows signup' do > lambda do > create_user > response.should be

Re: [rspec-users] Can you explain this code to me?

2008-02-07 Thread Bira
On Feb 7, 2008 9:26 PM, Pito Salas <[EMAIL PROTECTED]> wrote: > What does the combination of a lambda and a .should mean? I'm new to the list, but I think I can answer that :). >From what I know, it means that RSpec will run the lambda's code and check that it had the effect specified in the "sh

[rspec-users] Can you explain this code to me?

2008-02-07 Thread Pito Salas
I am experimenting with the restful-authentication plug in and I see that it has generated an rspec encantation which I had not seen before: it 'allows signup' do lambda do create_user response.should be_redirect end.should change(User, :count).by(1) end What does the comb