Re: [rspec-users] Running cucumber distributed across hardware

2008-09-22 Thread Scott Taylor
On Sep 22, 2008, at 8:11 PM, Bryan Helmkamp wrote: At my job, our story suite contains over 500 scenarios. While we're very happy with the regressions we've caught by running the suite, the long time it takes (~ 10+ minutes) is starting to lead to developers checking in without running it. This

Re: [rspec-users] plans for cucumber

2008-09-22 Thread David Chelimsky
On Mon, Sep 22, 2008 at 4:51 PM, Ashley Moran <[EMAIL PROTECTED]> wrote: > > On Sep 22, 2008, at 2:52 pm, David Chelimsky wrote: > >> Feel free to respond with questions/concerns (praise is welcome too!). >> We're really excited about Cucumber and all the benefits it brings >> (see http://blog.davi

Re: [rspec-users] Running cucumber distributed across hardware

2008-09-22 Thread Bryan Helmkamp
On Mon, Sep 22, 2008 at 8:32 PM, Mark Wilden <[EMAIL PROTECTED]> wrote: > I'm curious: could your unit tests be improved to minimize these problems? > In other words, when your build breaks, does that indicate a missing unit > test? That's a very good point. Sometimes, yes. If the stories fail bec

Re: [rspec-users] Running cucumber distributed across hardware

2008-09-22 Thread Mark Wilden
On Mon, Sep 22, 2008 at 5:11 PM, Bryan Helmkamp <[EMAIL PROTECTED]> wrote: > At my job, our story suite contains over 500 scenarios. While we're > very happy with the regressions we've caught by running the suite, the > long time it takes (~ 10+ minutes) is starting to lead to developers > checkin

[rspec-users] Running cucumber distributed across hardware

2008-09-22 Thread Bryan Helmkamp
At my job, our story suite contains over 500 scenarios. While we're very happy with the regressions we've caught by running the suite, the long time it takes (~ 10+ minutes) is starting to lead to developers checking in without running it. This is leading to broken builds, and the problems cascade

Re: [rspec-users] plans for cucumber

2008-09-22 Thread Ashley Moran
On Sep 22, 2008, at 2:52 pm, David Chelimsky wrote: Feel free to respond with questions/concerns (praise is welcome too!). We're really excited about Cucumber and all the benefits it brings (see http://blog.davidchelimsky.net/2008/9/22/cucumber), and we want to make the transition as easy as we

Re: [rspec-users] [newbie]: How to test for operations inside a block?

2008-09-22 Thread Mark Wilden
Carmine, someone could just give you the answer, but pardon me if I get a little Socratic on your ass* Given this code (which is similar to the code you're testing): authenticate() do |result| puts result end do you understand what's going on? When is 'puts result' executed? What code causes i

Re: [rspec-users] Including matchers in Cucumber

2008-09-22 Thread Ashley Moran
On Sep 22, 2008, at 12:30 pm, aslak hellesoy wrote: # Put this in steps/env.rb World do w = Object.new w.extend(TwitterMatchers) w end Aslak Cool! I did it like this in the end, when I figured out what it was doing: class MyWorld include TwitterMatchers end World do MyW

Re: [rspec-users] [newbie]: How to test for operations inside a block?

2008-09-22 Thread Carmine Moleti
So, after spending a little time trying to work with "and_yield", I strongly believe that: - Either I haven't understood what "and_yield" does - And this is more than possible - Or "and_yield" is not the toy I should be playing with. What I'm trying to accomplish is to writing tests for the

Re: [rspec-users] cucumber cli getting called incorrectly?

2008-09-22 Thread Aslak Hellesøy
Can you file a bug report please? Aslak On 22. sep.. 2008, at 20.30, Tim Glen <[EMAIL PROTECTED]> wrote: I'm running Rails 2.1.1 and the newest cucumber gem/plugin as of this morning. When I run scripts like `ruby script/generate` or any (I think) rake task (I tried 4 or 5), I get the follo

[rspec-users] cucumber cli getting called incorrectly?

2008-09-22 Thread Tim Glen
I'm running Rails 2.1.1 and the newest cucumber gem/plugin as of this morning. When I run scripts like `ruby script/generate` or any (I think) rake task (I tried 4 or 5), I get the following timg-2:1-3-development tim$ rake db:version (in /Users/tim/projects/dt/branches/1-3-development) Curren

Re: [rspec-users] [newbie]: How to test for operations inside a block?

2008-09-22 Thread Carmine Moleti
[...huge cut...] > In general, the mantra is "skinny controllers, fat models," meaning that Indeed, while waitin for a reply, I googled a bit and came right to the "skinny controllers, fat models" post! So I've refactored the user creation code into a class method on User. User.create_with_ro

Re: [rspec-users] [newbie]: How to test for operations inside a block?

2008-09-22 Thread Mark Wilden
On Mon, Sep 22, 2008 at 9:07 AM, Carmine Moleti <[EMAIL PROTECTED]>wrote: > > def create >authenticate_with_open_id(params[:identity_url], :required => [ > :nickname, :email ], :optional => :fullname) do |result, identity_url, > registration| > if result.successful? >@user = User

Re: [rspec-users] [newbie]: How to test for operations inside a block?

2008-09-22 Thread Carmine Moleti
Hi Mark, First off, thanks a lot for your reply! Mark Wilden wrote: > On Mon, Sep 22, 2008 at 9:07 AM, Carmine Moleti > <[EMAIL PROTECTED]>wrote: > >>assign_registration_attributes!(registration) >>@user.save(false) >>redirect_to users_path >> else >>redirec

Re: [rspec-users] [newbie]: How to test for operations inside a block?

2008-09-22 Thread Mark Wilden
On Mon, Sep 22, 2008 at 9:07 AM, Carmine Moleti <[EMAIL PROTECTED]>wrote: > > def create >authenticate_with_open_id(params[:identity_url], :required => [ > :nickname, :email ], :optional => :fullname) do |result, identity_url, > registration| > if result.successful? >@user = User

[rspec-users] [newbie]: How to test for operations inside a block?

2008-09-22 Thread Carmine Moleti
Hi to everyone, I'm just trying to wrap my mind around BDD and RSpec. I've gone through "The rails' way" and RSpec webcasts series, and still don't have a clear vision of RSpec. Is there anything else I could read/watch? Back in topic... Now I'm writing specs for a "create" action. The action is

[rspec-users] plans for cucumber

2008-09-22 Thread David Chelimsky
Hey all, Let's make this official. We're planning to replace the RSpec Story Runner with Cucumber. The rspec-1.1.5 release will still include the Story Runner (several fixes since the last release). So if you're not already using stories and you want to start, start with cucumber (http://github.co

Re: [rspec-users] Including matchers in Cucumber

2008-09-22 Thread aslak hellesoy
On Mon, Sep 22, 2008 at 1:21 PM, Ashley Moran <[EMAIL PROTECTED]> wrote: > Hi > > Where do you include matcher modules in Cucumber so they don't pollute > Object? ie so > > module TwitterMatchers >class HaveUserStatus > # ... >end > >def have_user_status(user, status) > Have

[rspec-users] Including matchers in Cucumber

2008-09-22 Thread Ashley Moran
Hi Where do you include matcher modules in Cucumber so they don't pollute Object? ie so module TwitterMatchers class HaveUserStatus # ... end def have_user_status(user, status) HaveUserStatus.new(user, status) end end is only visible in Then "it should pu