Re: [rspec-users] Anyone seen weird autotest behaviour on trunk?

2008-04-01 Thread Bart Zonneveld
On 31-mrt-2008, at 18:22, Ashley Moran wrote: > > On 31/03/2008, Bart Zonneveld <[EMAIL PROTECTED]> wrote: > I'm having the same problem, also with controllers. Weird part is, I > mostly have it at work, running OS 10.4, but not at home, running > 10.5. My environment is the same, except for the O

Re: [rspec-users] Anyone seen weird autotest behaviour on trunk?

2008-04-01 Thread Ashley Moran
On 01/04/2008, Bart Zonneveld <[EMAIL PROTECTED]> wrote: > > > According to 'svn up', it's revision for both rspec and > rspec_on_rails. Both at home and at work. Hmm, exact same revision as me. Are we the only one s having problems? I've also noticed errors along the lines of "ActionContr

Re: [rspec-users] Stub an instance method for every new instance of a class

2008-04-01 Thread Ashley Moran
On 01/04/2008, Jed Hurt <[EMAIL PROTECTED]> wrote: > > Is there an easy way to stub an instance method for every new instance of > a given class? I suppose I could just redefine the method, but I'm wondering > if the RSpec mocking framework has this built in. Hi Jed I hate it when other people a

Re: [rspec-users] Stub an instance method for every new instance of a class

2008-04-01 Thread Glenn Ford
I think the general consensus is that if you need this feature, then you have ugly code that needs cleaning up :) If you're in a situation like me, where you're too noob to figure out a better solution for some legacy code that you inherited, go to this url and find the instructions for in

[rspec-users] Tabs in the TextMate Bundle

2008-04-01 Thread Ollie Saunders
I tried to post this to the devel list but it never seemed to get through. So I'm posting it here in the hope that someone from the development team will notice: Hello, I noticed that you are using spaces in all the snippets in the TextMate bundle. I have TM set to 4 spaces and when I use the RSp

Re: [rspec-users] Tabs in the TextMate Bundle

2008-04-01 Thread David Chelimsky
On Tue, Apr 1, 2008 at 10:53 AM, Ollie Saunders <[EMAIL PROTECTED]> wrote: > I tried to post this to the devel list but it never seemed to get > through. So I'm posting it here in the hope that someone from the > development team will notice: If you want the dev team to notice, please post a tic

Re: [rspec-users] Stub an instance method for every new instance of a class

2008-04-01 Thread Jed Hurt
Haha, that's about the response I was expecting; I asked with some trepidation. I'm just looking for a quick hack to short-circuit Merb's render method to do some view/controller isolation testing until Merb officially supports it. I can't just stub methods on @controller (like in Rails) because th

Re: [rspec-users] Stub an instance method for every new instance of a class

2008-04-01 Thread Corey Haines
Could you stub out Controller.new and return your mock? On Tue, Apr 1, 2008 at 1:19 PM, Jed Hurt <[EMAIL PROTECTED]> wrote: > Haha, that's about the response I was expecting; I asked with some > trepidation. I'm just looking for a quick hack to short-circuit Merb's > render method to do some view

Re: [rspec-users] Stub an instance method for every new instance of a class

2008-04-01 Thread David Chelimsky
On Tue, Apr 1, 2008 at 2:11 PM, Corey Haines <[EMAIL PROTECTED]> wrote: > Could you stub out Controller.new and return your mock? Bingo. > > > > On Tue, Apr 1, 2008 at 1:19 PM, Jed Hurt <[EMAIL PROTECTED]> wrote: > > Haha, that's about the response I was expecting; I asked with some > trepidation

[rspec-users] problem rendering template with story

2008-04-01 Thread Tim Haines
Hi y'all The problem is probably because I'm a newb. I have a home controller in the admin namespace. My controller spec is working as expected, and the following example is passing: it "should show the home page if logged in" do controller.send("current_user=", User.new) get :index

Re: [rspec-users] problem rendering template with story

2008-04-01 Thread Tim Haines
Hi, Made a little progress here. In one of my "given" steps I was posting to the login action. when I take this post out (and make other changes required), the should render_template works correctly. It's as though the earlier post in the given step is meaning that the response isn't set corre

Re: [rspec-users] Stub an instance method for every new instance of a class

2008-04-01 Thread Jed Hurt
I'm not sure how that would work. For controller specs, I want to keep most of the controller intact so that I can verify its actual behavior. Am I missing something? On Tue, Apr 1, 2008 at 12:12 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Tue, Apr 1, 2008 at 2:11 PM, Corey Haines <[EMAIL

Re: [rspec-users] problem rendering template with story

2008-04-01 Thread Tim Haines
And I suspect this is because @first_render isn't being set for subsequent renders but it's time to go home now. On 02/04/2008, Tim Haines <[EMAIL PROTECTED]> wrote: > > Hi, > > Made a little progress here. In one of my "given" steps I was posting to > the login action. when I take this post

[rspec-users] Given Logged In

2008-04-01 Thread Tim Haines
Hi there, Given my recent problems with .should render_template after a second post, I'm wondering if there's a way I set the state as logged in inside a given step without posting to sessions/create? I can't seem to directly set sessions[:user_id]. I'm using restful_authentication. This is

Re: [rspec-users] Given Logged In

2008-04-01 Thread David Chelimsky
On Wed, Apr 2, 2008 at 1:16 AM, Tim Haines <[EMAIL PROTECTED]> wrote: > Hi there, > > Given my recent problems with .should render_template after a second post, > I'm wondering if there's a way I set the state as logged in inside a given > step without posting to sessions/create? Why not just post

Re: [rspec-users] Given Logged In

2008-04-01 Thread Tim Haines
Hi David. That does the login. So - yes - probably. I had thought it was breaking the "should render_template" that I make after the subsequent post, but maybe something else is causing that to break.. Tim. On 02/04/2008, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On Wed, Apr 2, 2008 at 1: