Re: [rspec-users] NameError when passing a URL helper to a method

2008-12-05 Thread Nick Hoffman
On 2008-12-04, at 19:56, Pat Maddox wrote: Nick Hoffman <[EMAIL PROTECTED]> writes: On 2008-12-04, at 17:43, Nick Hoffman wrote: The only solution that I can think of is to do this: before :each do @account_url = account_url end it_should_redirect_to 'the account page', @account_url Actuall

Re: [rspec-users] NameError when passing a URL helper to a method

2008-12-04 Thread Mark Wilden
On Thu, Dec 4, 2008 at 4:56 PM, Pat Maddox <[EMAIL PROTECTED]> wrote: > class Foo > @class_instance_variable = "blah" > > def foo >puts @class_instance_variable > end > end > > Foo.foo will print nothing, because @class_instance_variable is nil in > the object instance. > I don't know if

Re: [rspec-users] NameError when passing a URL helper to a method

2008-12-04 Thread Pat Maddox
Nick Hoffman <[EMAIL PROTECTED]> writes: > On 2008-12-04, at 17:43, Nick Hoffman wrote: >> The only solution that I can think of is to do this: >> before :each do >>@account_url = account_url >> end >> it_should_redirect_to 'the account page', @account_url > > Actually, that suggestion abov

Re: [rspec-users] NameError when passing a URL helper to a method

2008-12-04 Thread Pat Maddox
Nick Hoffman <[EMAIL PROTECTED]> writes: > Hi guys. I just wrote a small spec helper method to DRY up some of my > specs, and found that passing a URL helper (Eg: #photos_url) to a > method results in a NameError error. I extracted the problem into its > own short spec file to isolate it. Any thou

Re: [rspec-users] NameError when passing a URL helper to a method

2008-12-04 Thread Nick Hoffman
On 2008-12-04, at 17:43, Nick Hoffman wrote: The only solution that I can think of is to do this: before :each do @account_url = account_url end it_should_redirect_to 'the account page', @account_url Actually, that suggestion above of mine doesn't work. It fails with: You have a nil obj

Re: [rspec-users] NameError when passing a URL helper to a method

2008-12-04 Thread Nick Hoffman
On 2008-12-04, at 17:06, Zach Dennis wrote: On Thu, Dec 4, 2008 at 3:41 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote: Hi guys. I just wrote a small spec helper method to DRY up some of my specs, and found that passing a URL helper (Eg: #photos_url) to a method results in a NameError error. I e

Re: [rspec-users] NameError when passing a URL helper to a method

2008-12-04 Thread Zach Dennis
On Thu, Dec 4, 2008 at 3:41 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote: > Hi guys. I just wrote a small spec helper method to DRY up some of my specs, > and found that passing a URL helper (Eg: #photos_url) to a method results in > a NameError error. I extracted the problem into its own short spec

[rspec-users] NameError when passing a URL helper to a method

2008-12-04 Thread Nick Hoffman
Hi guys. I just wrote a small spec helper method to DRY up some of my specs, and found that passing a URL helper (Eg: #photos_url) to a method results in a NameError error. I extracted the problem into its own short spec file to isolate it. Any thoughts on what's going on?: http://gist.githu