Re: [rspec-users] Slides from my talk on Cucumber + Celerity + RSpec tonight

2008-10-01 Thread aslak hellesoy
On Thu, Oct 2, 2008 at 5:30 AM, Ashley Moran <[EMAIL PROTECTED]> wrote: > Hi all > > Just ran a session known as a "huddle" in GeekUp terms. GeekUp[1] is a > group of monthly events in North West England. The Sheffield one starts > with a huddle every month, which is intended to have more audienc

[rspec-users] Slides from my talk on Cucumber + Celerity + RSpec tonight

2008-10-01 Thread Ashley Moran
Hi all Just ran a session known as a "huddle" in GeekUp terms. GeekUp[1] is a group of monthly events in North West England. The Sheffield one starts with a huddle every month, which is intended to have more audience participation than a pure talk. For this one, I got an unsuspecting a

Re: [rspec-users] How do BOTH these examples pass?

2008-10-01 Thread Ashley Moran
On Oct 02, 2008, at 2:53 am, Pat Maddox wrote: btw this is applied in trunk, so if you haven't applied the patch yourself yet then you can just update to the latest code and you're set. Cool thanks for the info Pat Ashley -- http://www.patchspace.co.uk/ http://aviewfromafar.net/

Re: [rspec-users] Associations should be private

2008-10-01 Thread David Chelimsky
On Wed, Oct 1, 2008 at 8:38 PM, Mark Wilden <[EMAIL PROTECTED]> wrote: > On Wed, Oct 1, 2008 at 6:22 PM, Ashley Moran <[EMAIL PROTECTED]> > wrote: >> >> On Oct 01, 2008, at 8:17 pm, Mark Wilden wrote: >> >>> Sounds like future-proofing to me. In the case of libraries, that can be >>> a good thing.

Re: [rspec-users] Associations should be private

2008-10-01 Thread Ashley Moran
On Oct 02, 2008, at 2:38 am, Mark Wilden wrote: However, I say that there are too many things that need doing right now - right this second - to waste time on what may or may not happen in the future. Put another way, what are you willing to give up in order to add this layer? Perhaps I

Re: [rspec-users] How do BOTH these examples pass?

2008-10-01 Thread Pat Maddox
Ashley Moran <[EMAIL PROTECTED]> writes: > On Oct 01, 2008, at 6:39 pm, David Chelimsky wrote: > >> There were a couple of other bugs introduced in 1.1.5 so I would like >> to get out a 1.1.6 very soon. Probably over the weekend if we can get >> them all fixed. > > > Cool thanks David. > > It's no

Re: [rspec-users] Associations should be private

2008-10-01 Thread Mark Wilden
On Wed, Oct 1, 2008 at 6:22 PM, Ashley Moran <[EMAIL PROTECTED]>wrote: > > On Oct 01, 2008, at 8:17 pm, Mark Wilden wrote: > > Sounds like future-proofing to me. In the case of libraries, that can be a >> good thing. For application code, it flies in the face of YAGNI. >> > > Actually I don't thi

Re: [rspec-users] Associations should be private

2008-10-01 Thread Ashley Moran
On Oct 01, 2008, at 8:17 pm, Mark Wilden wrote: Sounds like future-proofing to me. In the case of libraries, that can be a good thing. For application code, it flies in the face of YAGNI. Actually I don't think that's a YAGNI. You need *an* interface to your models, the question is whet

Re: [rspec-users] How do BOTH these examples pass?

2008-10-01 Thread Ashley Moran
On Oct 01, 2008, at 6:39 pm, David Chelimsky wrote: There were a couple of other bugs introduced in 1.1.5 so I would like to get out a 1.1.6 very soon. Probably over the weekend if we can get them all fixed. Cool thanks David. It's not such an issue now I know how to work round it but it wa

[rspec-users] Story runner has session limit of 4000 bytes, like CookieStore

2008-10-01 Thread Yar Dmitriev
This could be intentional, but still surprising. Say, we are using ActiveRecord session store, according to the setting in environment.rb: config.action_controller.session_store = :active_record_store When controller writes 5000 bytes to the session: session[:foo] = "a" * 5000 The application wo

Re: [rspec-users] Spec for 'an array should not include an item'

2008-10-01 Thread Pat Maddox
Neil Cauldwell <[EMAIL PROTECTED]> writes: > Pat Maddox wrote: >> Neil Cauldwell <[EMAIL PROTECTED]> writes: >> > ...so shouldn't the spec fail if we're returning all the users fixtures which is true. [1,2,3] is not an element of the array [1,2,3]. I used >>> description); >>> results

Re: [rspec-users] Spec for 'an array should not include an item'

2008-10-01 Thread Neil Cauldwell
Pat Maddox wrote: > Neil Cauldwell <[EMAIL PROTECTED]> writes: > ...so shouldn't the spec fail if we're returning all the users fixtures >>> which is true. [1,2,3] is not an element of the array [1,2,3]. I used >> description); >> results >> ...so I'm one step closer but I'm now a little c

Re: [rspec-users] Spec for 'an array should not include an item'

2008-10-01 Thread Pat Maddox
Neil Cauldwell <[EMAIL PROTECTED]> writes: > Pat Maddox wrote: >> Neil Cauldwell <[EMAIL PROTECTED]> writes: >> >>> (which it doesn't, therefore suggesting the spec is broken); >>>def do_get >>> ThinkingSphinx::Search.stub!(:search).and_return(users) >>> get :people, :search =

Re: [rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again

2008-10-01 Thread Evan Light
On Oct 1, 2008, at 2:50 PM, aslak hellesoy wrote: Does anyone want Cucumber gems? No? Yes? Anyone? OK I HEARD YOU! :-) http://rubyforge.org/frs/?group_id=797 Just chill till it rsyncs around. Install docs are updated: http://github.com/aslakhellesoy/cucumber/wikis/home Thank you!___

Re: [rspec-users] Spec for 'an array should not include an item'

2008-10-01 Thread Neil Cauldwell
Pat Maddox wrote: > Neil Cauldwell <[EMAIL PROTECTED]> writes: > >>> >> (which it doesn't, therefore suggesting the spec is broken); >>def do_get >> ThinkingSphinx::Search.stub!(:search).and_return(users) >> get :people, :search => "bob" >>end >> >> ...so shouldn't the spec fail

Re: [rspec-users] Associations should be private

2008-10-01 Thread Mark Wilden
On Wed, Oct 1, 2008 at 11:29 AM, Michael Latta <[EMAIL PROTECTED]> wrote: > The point is to never assume the structure of another object, but to let it > decide that. So you never get A.B.C you always use a method on A to do the > work. You get a lot more methods on A but the structure undernea

Re: [rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again

2008-10-01 Thread aslak hellesoy
On Wed, Oct 1, 2008 at 7:03 PM, Luis Lavena <[EMAIL PROTECTED]> wrote: > On Wed, Oct 1, 2008 at 12:30 PM, Chris Flipse <[EMAIL PROTECTED]> wrote: >> >> >> On Wed, Oct 1, 2008 at 11:20 AM, aslak hellesoy <[EMAIL PROTECTED]> >> wrote: >>> >>> On Wed, Oct 1, 2008 at 5:11 PM, Chris Flipse <[EMAIL PROTE

Re: [rspec-users] [ANN] Cucumber Textmate Bundle

2008-10-01 Thread Matt Wynne
How about - can you somehow fork it to the new name, thereby keeping the old things up and running but blazing a new and shiny train from henceforth? Otherwise, it's gotta be a no, hasn't it? On 1 Oct 2008, at 19:12, Ben Mabey wrote: Ben Mabey wrote: Matt Wynne wrote: Is it possible to re

Re: [rspec-users] Associations should be private

2008-10-01 Thread Michael Latta
The point is to never assume the structure of another object, but to let it decide that. So you never get A.B.C you always use a method on A to do the work. You get a lot more methods on A but the structure underneath can change without a ripple effect. For example if you had 2 associati

Re: [rspec-users] [ANN] Cucumber Textmate Bundle

2008-10-01 Thread Ben Mabey
Ben Mabey wrote: Matt Wynne wrote: Is it possible to rename the project maybe? I know you can have dots in the name - e.g. http://github.com/thoughtworks/cruisecontrol.rb though I think I may have heard this was a restriction that was lifted relatively recently. I'll look into it. I named i

Re: [rspec-users] How do BOTH these examples pass?

2008-10-01 Thread David Chelimsky
On Wed, Oct 1, 2008 at 10:32 AM, Pat Maddox <[EMAIL PROTECTED]> wrote: > Ashley Moran <[EMAIL PROTECTED]> writes: > >> On 1 Oct 2008, at 15:23, Pat Maddox wrote: >> >>> I think this may be a bug that I introduced recently. Fortunately I >>> also think someone already wrote a patch :) Check out >>

Re: [rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again

2008-10-01 Thread Luis Lavena
On Wed, Oct 1, 2008 at 12:30 PM, Chris Flipse <[EMAIL PROTECTED]> wrote: > > > On Wed, Oct 1, 2008 at 11:20 AM, aslak hellesoy <[EMAIL PROTECTED]> > wrote: >> >> On Wed, Oct 1, 2008 at 5:11 PM, Chris Flipse <[EMAIL PROTECTED]> wrote: >> > On Tue, Sep 30, 2008 at 5:20 PM, aslak hellesoy >> > <[EMAIL

Re: [rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again

2008-10-01 Thread Evan Light
On Oct 1, 2008, at 12:09 PM, Ashley Moran wrote: On 1 Oct 2008, at 16:53, aslak hellesoy wrote: No, actually - it's been me trying to convince the GitHub pixies to build the gem. To no avail. Have we witnessed the birth of Pixie Driven Development this week? I feel like we need PixieSpe

Re: [rspec-users] Spec for 'an array should not include an item'

2008-10-01 Thread Pat Maddox
Neil Cauldwell <[EMAIL PROTECTED]> writes: > Pat Maddox wrote: >> Neil Cauldwell <[EMAIL PROTECTED]> writes: >>> >>> respond_to do |format| >>> format.html >>> format.xml { render :xml => @results } >>> end >>> end >>> >>> Cheers >> >> You're stubbing User.search, but you d

Re: [rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again

2008-10-01 Thread Ashley Moran
On 1 Oct 2008, at 16:53, aslak hellesoy wrote: No, actually - it's been me trying to convince the GitHub pixies to build the gem. To no avail. Have we witnessed the birth of Pixie Driven Development this week? I feel like we need PixieSpec and Pixie Stories next :) Ashley -- http://www.

Re: [rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again

2008-10-01 Thread Evan Light
On Oct 1, 2008, at 11:53 AM, aslak hellesoy wrote: No, actually - it's been me trying to convince the GitHub pixies to build the gem. To no avail. Not to belabor a point overly but hence my suggestion to put a gem on RubyForge. I'm dying for a stable version of Cucumber -- even if it's onl

Re: [rspec-users] [ANN] Cucumber Textmate Bundle

2008-10-01 Thread aslak hellesoy
On Wed, Oct 1, 2008 at 5:54 PM, Ben Mabey <[EMAIL PROTECTED]> wrote: > Matt Wynne wrote: >> >> Is it possible to rename the project maybe? I know you can have dots in >> the name - e.g. http://github.com/thoughtworks/cruisecontrol.rb though I >> think I may have heard this was a restriction that wa

Re: [rspec-users] [ANN] Cucumber Textmate Bundle

2008-10-01 Thread Ben Mabey
Matt Wynne wrote: Is it possible to rename the project maybe? I know you can have dots in the name - e.g. http://github.com/thoughtworks/cruisecontrol.rb though I think I may have heard this was a restriction that was lifted relatively recently. I'll look into it. I named it that because all

Re: [rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again

2008-10-01 Thread aslak hellesoy
On Wed, Oct 1, 2008 at 5:30 PM, Chris Flipse <[EMAIL PROTECTED]> wrote: > > > On Wed, Oct 1, 2008 at 11:20 AM, aslak hellesoy <[EMAIL PROTECTED]> > wrote: >> >> On Wed, Oct 1, 2008 at 5:11 PM, Chris Flipse <[EMAIL PROTECTED]> wrote: >> > On Tue, Sep 30, 2008 at 5:20 PM, aslak hellesoy >> > <[EMAIL

Re: [rspec-users] How do BOTH these examples pass?

2008-10-01 Thread Pat Maddox
Ashley Moran <[EMAIL PROTECTED]> writes: > On 1 Oct 2008, at 15:23, Pat Maddox wrote: > >> I think this may be a bug that I introduced recently. Fortunately I >> also think someone already wrote a patch :) Check out >> http://rspec.lighthouseapp.com/projects/5645/tickets/548 and see if it >> sol

Re: [rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again

2008-10-01 Thread Chris Flipse
On Wed, Oct 1, 2008 at 11:20 AM, aslak hellesoy <[EMAIL PROTECTED]>wrote: > On Wed, Oct 1, 2008 at 5:11 PM, Chris Flipse <[EMAIL PROTECTED]> wrote: > > On Tue, Sep 30, 2008 at 5:20 PM, aslak hellesoy < > [EMAIL PROTECTED]> > > wrote: > >> > >> On Tue, Sep 30, 2008 at 9:02 PM, Evan David Light > >>

Re: [rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again

2008-10-01 Thread aslak hellesoy
On Wed, Oct 1, 2008 at 5:11 PM, Chris Flipse <[EMAIL PROTECTED]> wrote: > On Tue, Sep 30, 2008 at 5:20 PM, aslak hellesoy <[EMAIL PROTECTED]> > wrote: >> >> On Tue, Sep 30, 2008 at 9:02 PM, Evan David Light >> <[EMAIL PROTECTED]> wrote: >> > Subject says most of it. I'd love to use Cucumber in my

Re: [rspec-users] Cucumber: please make "gem install aslakhellesoy-cucumber" or "gem install cucumber" work again

2008-10-01 Thread Chris Flipse
On Tue, Sep 30, 2008 at 5:20 PM, aslak hellesoy <[EMAIL PROTECTED]>wrote: > On Tue, Sep 30, 2008 at 9:02 PM, Evan David Light > <[EMAIL PROTECTED]> wrote: > > Subject says most of it. I'd love to use Cucumber in my project but I > need > > to be able to install it in a Rails app and by a particul

Re: [rspec-users] Spec for 'an array should not include an item'

2008-10-01 Thread Neil Cauldwell
Pat Maddox wrote: > Neil Cauldwell <[EMAIL PROTECTED]> writes: >> >> respond_to do |format| >> format.html >> format.xml { render :xml => @results } >> end >> end >> >> Cheers > > You're stubbing User.search, but you don't actually call it. search > ends up being called on

Re: [rspec-users] Associations should be private

2008-10-01 Thread Mark Wilden
On Wed, Oct 1, 2008 at 6:11 AM, David Chelimsky <[EMAIL PROTECTED]>wrote: > It's been a while since I've taken a look at it, but Luke Redpath has > a plugin called Demeter's Revenge > (http://plugins.code.lukeredpath.co.uk/browser/demeters_revenge/trunk) > that actually manages this all for you b

Re: [rspec-users] How do BOTH these examples pass?

2008-10-01 Thread Ashley Moran
On 1 Oct 2008, at 15:23, Pat Maddox wrote: I think this may be a bug that I introduced recently. Fortunately I also think someone already wrote a patch :) Check out http://rspec.lighthouseapp.com/projects/5645/tickets/548 and see if it solves your problem. Aha! That's it. That's a pretty

Re: [rspec-users] Spec for 'an array should not include an item'

2008-10-01 Thread Pat Maddox
Neil Cauldwell <[EMAIL PROTECTED]> writes: > Is my stubbing breaking this? I hope not because Thinking SPhinx isn't > determining the scope of the search in relation to the 'active' state of > the users; the search is built on top of a named scope on the User > model; > > # GET /searches/peopl

Re: [rspec-users] How do BOTH these examples pass?

2008-10-01 Thread Pat Maddox
Ashley Moran <[EMAIL PROTECTED]> writes: > *does* pass the specs, both the one that says parse should be called, > and the one that say it shouldn't! But why? I'm prepared to admit > I'm just missing something really really really obvious (it happens > often), but how can: > > it "should atte

Re: [rspec-users] Shoulda

2008-10-01 Thread Andy Freeman
I updated the gist posting. All of the macros should be functional now and have cleaned up describe blocks. http://gist.github.com/14050 Andy Freeman wrote: > It is a bit ugly but here is an initial port of the Shoulda ActiveRecord > macros: > > http://gist.github.com/14050 > > I did not try

Re: [rspec-users] How do BOTH these examples pass?

2008-10-01 Thread Mikel Lindsaar
On Wed, Oct 1, 2008 at 11:26 PM, Ashley Moran <[EMAIL PROTECTED]> wrote: > *does* pass the specs, both the one that says parse should be called, and > the one that say it shouldn't! But why? I'm prepared to admit I'm just > missing something really really really obvious (it happens often), but ho

Re: [rspec-users] Spec for 'an array should not include an item'

2008-10-01 Thread Neil Cauldwell
David Chelimsky wrote: > On Wed, Oct 1, 2008 at 2:33 AM, Neil Cauldwell <[EMAIL PROTECTED]> > wrote: >>> Also, what is your data? The matcher may not work as expected due to >> describe "handling GET /searches/people" do >> >> it "should not include any inactive users in an assigned array of use

Re: [rspec-users] How do BOTH these examples pass?

2008-10-01 Thread Ashley Moran
On 1 Oct 2008, at 14:11, Mikel Lindsaar wrote: Changing it to: def rss rss_body = begin @uri.read ::RSS::Parser.parse(rss_body, false) rescue OpenURI::HTTPError => e nil end end Ah don't worry, that's what my real code does. The cod

Re: [rspec-users] Associations should be private

2008-10-01 Thread Ashley Moran
On 1 Oct 2008, at 14:11, David Chelimsky wrote: It's been a while since I've taken a look at it, but Luke Redpath has a plugin called Demeter's Revenge (http://plugins.code.lukeredpath.co.uk/browser/demeters_revenge/trunk) that actually manages this all for you by adding methods like team.add_p

Re: [rspec-users] Associations should be private

2008-10-01 Thread David Chelimsky
On Wed, Oct 1, 2008 at 7:54 AM, Ashley Moran <[EMAIL PROTECTED]> wrote: > Hi > > The discussion among me, David, Michael, and Pat got me thinking. > Specifically this by Michael: > >> Just my $0.02, but I really like specs to be treated as specifications for >> what SHOULD be happening, not preten

Re: [rspec-users] How do BOTH these examples pass?

2008-10-01 Thread Mikel Lindsaar
On Wed, Oct 1, 2008 at 1:02 AM, Ashley Moran <[EMAIL PROTECTED]> wrote: > RssReader when there is an HTTP error > - should attempt to parse the RSS > - should not attempt to parse the RSS > - should fail gracefully >From what I can see, your code error is not doing anything with the caught except

Re: [rspec-users] Spec for 'an array should not include an item'

2008-10-01 Thread David Chelimsky
On Wed, Oct 1, 2008 at 2:33 AM, Neil Cauldwell <[EMAIL PROTECTED]> wrote: > Ben Mabey wrote: >> Pat Maddox wrote: >>> ___ >>> rspec-users mailing list >>> rspec-users@rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >>> >> >> >> Al

[rspec-users] Associations should be private

2008-10-01 Thread Ashley Moran
Hi The discussion among me, David, Michael, and Pat got me thinking. Specifically this by Michael: Just my $0.02, but I really like specs to be treated as specifications for what SHOULD be happening, not pretending other code is different than it is. This made me think the real solutio

Re: [rspec-users] Shoulda

2008-10-01 Thread Andy Freeman
It is a bit ugly but here is an initial port of the Shoulda ActiveRecord macros: http://gist.github.com/14050 I did not try running ALL of the macros, but most of them. Before going too far with it, I would appreciate some recommendations as to how to improve the flow. The Shoulda version ha

Re: [rspec-users] Spec for 'an array should not include an item'

2008-10-01 Thread Neil Cauldwell
Ben Mabey wrote: > Pat Maddox wrote: >>> >> ___ >> rspec-users mailing list >> rspec-users@rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > > > Also, what is your data? The matcher may not work as expected due to > nuances in