Re: [rspec-users] Getting heckled by Heckle?

2009-01-03 Thread Sebastian W.
Yehuda Katz wrote: > There is more than 1 bug in Heckle that can produce this behavior. Tim > Carey > Smith (halorgium) has been working on a much saner replacement with > effectively the same feature set called boo_hiss, but I'm not sure if > it's > quite ready yet. I've used it a bit but last I

Re: [rspec-users] Rspec Rails high overhead

2009-01-03 Thread Mark Wilden
On Sat, Jan 3, 2009 at 6:58 PM, Reza Primardiansyah < reza.primardians...@gmail.com> wrote: > I found out that running RSpec on Rails takes too much overhead. It takes > more than 16s per run although the specs only take less than 6s, like seen > below. The killer is the time it takes to load e

Re: [rspec-users] How to spec a controller method that involves an rjs redirect

2009-01-03 Thread Stephen Eley
On Fri, Jan 2, 2009 at 11:01 AM, Nasir Jamal wrote: > > What is the best way to spec a controller method that involves an rjs > redirect? Something like this Consider: response.should =~ /window\.location\.href = '(whatever your expected path is)';/ I didn't confirm that regex, obviously. But

Re: [rspec-users] Cucumber speed tips

2009-01-03 Thread Luke Melia
On Jan 3, 2009, at 9:12 PM, Ben Mabey wrote: The downside with this approach is that it only works with the rails webrat adapter. One solution which I have been meaning to do is to create a UsersSessionManager. The manager would be responsible for logging in all the various roles you use

[rspec-users] Rspec Rails high overhead

2009-01-03 Thread Reza Primardiansyah
Greetings, I found out that running RSpec on Rails takes too much overhead. It takes more than 16s per run although the specs only take less than 6s, like seen below. That means almost 11s overhead. I can't find the bottleneck. I use latest rspec, and rails 2.2 on Debian. $ time rake spec > (in /h

Re: [rspec-users] Cucumber speed tips

2009-01-03 Thread Ben Mabey
On 1/3/09 6:41 PM, Luke Melia wrote: On Dec 27, 2008, at 3:08 AM, Mischa Fierer wrote: You only need to test login for each login case, not for each time you are testing some sort of logged in functionality. In most cases you can just post to sessions/create rather than filling in a login form

Re: [rspec-users] Cucumber speed tips

2009-01-03 Thread Luke Melia
On Dec 28, 2008, at 11:30 AM, Josh Knowles wrote: 4) Distribute your scenarios across multiple processes using TestJour (http://github.com/brynary/testjour) To provide a little more info (Josh and I work with Bryan, who created testjour): we have a cucumber suite currently consisting of 5835

Re: [rspec-users] Cucumber speed tips

2009-01-03 Thread Luke Melia
On Dec 27, 2008, at 3:08 AM, Mischa Fierer wrote: You only need to test login for each login case, not for each time you are testing some sort of logged in functionality. In most cases you can just post to sessions/create rather than filling in a login form. I also wanted to speed up the "G

Re: [rspec-users] How to spec a controller method that involves an rjs redirect

2009-01-03 Thread David Chelimsky
On Fri, Jan 2, 2009 at 10:01 AM, Nasir Jamal wrote: > Hi everyone, > > What is the best way to spec a controller method that involves an rjs > redirect? Something like this > > def index > url_to = @parent ? auction_bids_path(@parent) : auctions_path > render :update do |page| > page.redi

Re: [rspec-users] Do people write specs for the code in their steps? How?

2009-01-03 Thread Matt Wynne
On 30 Dec 2008, at 04:17, Erik Pukinskis wrote: The approach I like to take is to follow the guidance of the system (cucumber + rspec) every step of the way. Right now there are no passing steps, so I'd write the code for the 1st pending step, run the features and find the first thing that i

Re: [rspec-users] newbie: need help to write the spec for helper

2009-01-03 Thread Matt Wynne
On 31 Dec 2008, at 16:11, aslak hellesoy wrote: On Wed, Dec 31, 2008 at 5:02 PM, David Chelimsky wrote: > So do you recommend never doing helper specs? I never said never :-) Here is my manifesto styled take on this: "I favour testing directly accessible APIs over indirectly accessible o

Re: [rspec-users] Getting heckled by Heckle?

2009-01-03 Thread Yehuda Katz
There is more than 1 bug in Heckle that can produce this behavior. Tim Carey Smith (halorgium) has been working on a much saner replacement with effectively the same feature set called boo_hiss, but I'm not sure if it's quite ready yet. I've used it a bit but last I checked the user interface (not