Re: [rspec-users] shared examples sharing methods

2009-06-17 Thread Ben Mabey
David Chelimsky wrote: On Wed, Jun 17, 2009 at 10:14 AM, Andrew Premdas wrote: Please have a look at http://gist.github.com/131277 What I'd like to do is create a shared_examples group which I can parametize a method. So my shared example would perhaps use method named_address=, or set_named_

Re: [rspec-users] shared examples sharing methods

2009-06-17 Thread Nicolás Sanguinetti
On Thu, Jun 18, 2009 at 1:36 AM, Stephen Eley wrote: > On Thu, Jun 18, 2009 at 12:17 AM, Ben Mabey wrote: >> >> If you do go down that route, I recommend method calls instead of instance >> variables.  That way it will yell out you when you forget to define one. :) > > Hey, instance variables do th

Re: [rspec-users] shared examples sharing methods

2009-06-17 Thread Stephen Eley
On Thu, Jun 18, 2009 at 12:17 AM, Ben Mabey wrote: > > If you do go down that route, I recommend method calls instead of instance > variables.  That way it will yell out you when you forget to define one. :) Hey, instance variables do that too. Yelling == "my tests fail." >8-> (And if they don'

Re: [rspec-users] shared examples sharing methods

2009-06-17 Thread Ben Mabey
David Chelimsky wrote: On Wed, Jun 17, 2009 at 1:19 PM, Matt Wynne wrote: On 17 Jun 2009, at 16:21, David Chelimsky wrote: On Wed, Jun 17, 2009 at 10:14 AM, Andrew Premdas wrote: Please have a look at http://gist.github.com/131277 What I'd like to do is create a shared_examples

Re: [rspec-users] Problem verifying routing error

2009-06-17 Thread David Chelimsky
On Wed, Jun 17, 2009 at 6:54 PM, wrote: > > > Okay, after such a harsh analysis of the problem, I figured it was worth > digging in just a little bit more.  Side note, some of what I was seeing > yesterday was a by-product of having default routes still existing.  But > there are still some ess

Re: [rspec-users] Problem verifying routing error

2009-06-17 Thread r_j_h_box-sf
Okay, after such a harsh analysis of the problem, I figured it was worth digging in just a little bit more. Side note, some of what I was seeing yesterday was a by-product of having default routes still existing. But there are still some essential facts that remain, which I present here. 1.

Re: [rspec-users] shared examples sharing methods

2009-06-17 Thread Stephen Eley
On Wed, Jun 17, 2009 at 11:14 AM, Andrew Premdas wrote: > What I'd like to do is create a shared_examples group which I can parametize > a method. So my shared example would perhaps use method named_address=, or > set_named_address and then groups that behave like "Named address" would be > able to

Re: [rspec-users] removing Mocha; 'spec spec' fails but the specific model file passes

2009-06-17 Thread Doug
ok, I investigated further...and I'm still confused. this is testing a typical authenticate class method.. # login can be either username or email address def self.authenticate(login, pass) user = find_by_username(login) || find_by_email(login) return user if user && user.matching

Re: [rspec-users] shared examples sharing methods

2009-06-17 Thread David Chelimsky
On Wed, Jun 17, 2009 at 1:19 PM, Matt Wynne wrote: > > On 17 Jun 2009, at 16:21, David Chelimsky wrote: > >> On Wed, Jun 17, 2009 at 10:14 AM, Andrew Premdas >> wrote: >>> >>> Please have a look at >>> http://gist.github.com/131277 >>> What I'd like to do is create a shared_examples group which I c

Re: [rspec-users] shared examples sharing methods

2009-06-17 Thread Matt Wynne
On 17 Jun 2009, at 16:21, David Chelimsky wrote: On Wed, Jun 17, 2009 at 10:14 AM, Andrew Premdas wrote: Please have a look at http://gist.github.com/131277 What I'd like to do is create a shared_examples group which I can parametize a method. So my shared example would perhaps use method

Re: [rspec-users] shared examples sharing methods

2009-06-17 Thread David Chelimsky
On Wed, Jun 17, 2009 at 10:14 AM, Andrew Premdas wrote: > Please have a look at > http://gist.github.com/131277 > What I'd like to do is create a shared_examples group which I can parametize > a method. So my shared example would perhaps use method named_address=, or > set_named_address and then gr

[rspec-users] shared examples sharing methods

2009-06-17 Thread Andrew Premdas
Please have a look at http://gist.github.com/131277 What I'd like to do is create a shared_examples group which I can parametize a method. So my shared example would perhaps use method named_address=, or set_named_address and then groups that behave like "Named address" would be able to override