From benilov at gmail.com Sun Jul 1 05:07:10 2007 From: benilov at gmail.com (Jake Benilov) Date: Sun, 1 Jul 2007 11:07:10 +0200 Subject: [rbehave-users] combining rspec and rbehave In-Reply-To: <1182959609.8906.10.camel@kyle> References: <1182959609.8906.10.camel@kyle> Message-ID: <6fc165060707010207l40deae22iec10187436f9aad2@mail.gmail.com> Hi Dan, Thank you for your hints. I gave it another go, and am still having problems. Here is a simple example: ~~~~~ require 'rubygems' require 'rbehave' require 'spec' Story "Test", %(test story) do Scenario "rspec is used" do When "the scenario uses an rspec matcher" do [1,2,3].should have(3).items end end end ~~~~ This only works if I add the workaround that you suggested: module RBehave::World include Spec::Matchers end Am I doing something wrong? Regards, Jake On 6/27/07, Dan North wrote: > > Hi Jake. > > I just realised I wasn't subscribed to the users list! I've updated rbehave > to support rspec custom matchers (basically anything included in > Spec::Matchers). > > There's a new gem (0.3.0) available on rubyforge. Please give it a try and > let me know how you get on. > > I agree - I would love to see rspec+rbehave become the suite of choice for > acceptance testing. > > Cheers, > Dan > _______________________________________________ > rbehave-users mailing list > rbehave-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rbehave-users > > From dan at tastapod.com Mon Jul 2 04:34:58 2007 From: dan at tastapod.com (Dan North) Date: Mon, 02 Jul 2007 09:34:58 +0100 Subject: [rbehave-users] combining rspec and rbehave In-Reply-To: <6fc165060707010207l40deae22iec10187436f9aad2@mail.gmail.com> References: <1182959609.8906.10.camel@kyle> <6fc165060707010207l40deae22iec10187436f9aad2@mail.gmail.com> Message-ID: <4688B8B2.6090703@tastapod.com> Hi Jake. Which version of the rbehave gem are you using? I ran your code verbatim using rbehave 0.3.0 with rspec versions 1.0.3 and 1.0.5 and it works ok for me: *$ cat jake.rb * require 'rubygems' require 'rbehave' require 'spec' Story "Test", %(test story) do Scenario "rspec is used" do When "the scenario uses an rspec matcher" do [1,2,3].should have(3).items end end end *$ ruby jake.rb * Running 1 scenarios: . 1 scenarios: 1 succeeded, 0 failed, 0 pending Can you double-check your versions of rbehave and rspec please? I know rspec's matchers got repackaged not so long ago, so that might be affecting things. If so, updating both gems to the latest versions should fix it. Also, you don't need to require 'spec' for the matchers because rbehave bakes that in anyway. I'm on holiday so I'll be checking mail infrequently. Thanks, Dan Jake Benilov wrote: > Hi Dan, > > Thank you for your hints. I gave it another go, and am still having > problems. Here is a simple example: > > ~~~~~ > require 'rubygems' > require 'rbehave' > require 'spec' > > Story "Test", %(test story) do > Scenario "rspec is used" do > When "the scenario uses an rspec matcher" do > [1,2,3].should have(3).items > end > end > end > ~~~~ > This only works if I add the workaround that you suggested: > > module RBehave::World > include Spec::Matchers > end > > Am I doing something wrong? > Regards, > Jake > > On 6/27/07, Dan North wrote: > >> Hi Jake. >> >> I just realised I wasn't subscribed to the users list! I've updated rbehave >> to support rspec custom matchers (basically anything included in >> Spec::Matchers). >> >> There's a new gem (0.3.0) available on rubyforge. Please give it a try and >> let me know how you get on. >> >> I agree - I would love to see rspec+rbehave become the suite of choice for >> acceptance testing. >> >> Cheers, >> Dan >> _______________________________________________ >> rbehave-users mailing list >> rbehave-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rbehave-users >> >> >> > _______________________________________________ > rbehave-users mailing list > rbehave-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rbehave-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rbehave-users/attachments/20070702/36dab6ce/attachment.html From benilov at gmail.com Mon Jul 2 18:10:47 2007 From: benilov at gmail.com (Jake Benilov) Date: Tue, 3 Jul 2007 00:10:47 +0200 Subject: [rbehave-users] combining rspec and rbehave In-Reply-To: <4688B8B2.6090703@tastapod.com> References: <1182959609.8906.10.camel@kyle> <6fc165060707010207l40deae22iec10187436f9aad2@mail.gmail.com> <4688B8B2.6090703@tastapod.com> Message-ID: <6fc165060707021510p28e87cfaha005ac5e7bf5edd9@mail.gmail.com> Dan, I think I may have a lead on the problem - the failure only occurs on OS X (is that possible?). Per your suggestion, i've updated my rspec and rbehave gems on both my macbook and my WinXP machine. Lo and behold - the example on the XP machine worked, while I still got failures on the OS X box. I shall investigate further. Regarding the rspec being baked in, would it be worth making the dependency explicit perhaps? (so that the compatible version of the rspec gem is pulled down when you're installing rbehave) Regards, Jake On 7/2/07, Dan North wrote: > > Hi Jake. > > Which version of the rbehave gem are you using? I ran your code verbatim > using rbehave 0.3.0 with rspec versions 1.0.3 and 1.0.5 and it works ok for > me: > > $ cat jake.rb > > require 'rubygems' > require 'rbehave' > require 'spec' > > Story "Test", %(test story) do > Scenario "rspec is used" do > When "the scenario uses an rspec matcher" do > [1,2,3].should have(3).items > end > end > end > > $ ruby jake.rb > > Running 1 scenarios: > . > > 1 scenarios: 1 succeeded, 0 failed, 0 pending > > Can you double-check your versions of rbehave and rspec please? I know > rspec's matchers got repackaged not so long ago, so that might be affecting > things. If so, updating both gems to the latest versions should fix it. > > Also, you don't need to require 'spec' for the matchers because rbehave > bakes that in anyway. > > I'm on holiday so I'll be checking mail infrequently. > > Thanks, > Dan > > > > Jake Benilov wrote: > Hi Dan, > > Thank you for your hints. I gave it another go, and am still having > problems. Here is a simple example: > > ~~~~~ > require 'rubygems' > require 'rbehave' > require 'spec' > > Story "Test", %(test story) do > Scenario "rspec is used" do > When "the scenario uses an rspec matcher" do > [1,2,3].should have(3).items > end > end > end > ~~~~ > This only works if I add the workaround that you suggested: > > module RBehave::World > include Spec::Matchers > end > > Am I doing something wrong? > Regards, > Jake > > On 6/27/07, Dan North wrote: > > > Hi Jake. > > I just realised I wasn't subscribed to the users list! I've updated rbehave > to support rspec custom matchers (basically anything included in > Spec::Matchers). > > There's a new gem (0.3.0) available on rubyforge. Please give it a try and > let me know how you get on. > > I agree - I would love to see rspec+rbehave become the suite of choice for > acceptance testing. > > Cheers, > Dan > _______________________________________________ > rbehave-users mailing list > rbehave-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rbehave-users > > > > _______________________________________________ > rbehave-users mailing list > rbehave-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rbehave-users > > > > _______________________________________________ > rbehave-users mailing list > rbehave-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rbehave-users > > From dan at tastapod.com Tue Jul 3 17:05:36 2007 From: dan at tastapod.com (Dan North) Date: Tue, 03 Jul 2007 22:05:36 +0100 Subject: [rbehave-users] combining rspec and rbehave In-Reply-To: <6fc165060707021510p28e87cfaha005ac5e7bf5edd9@mail.gmail.com> References: <1182959609.8906.10.camel@kyle> <6fc165060707010207l40deae22iec10187436f9aad2@mail.gmail.com> <4688B8B2.6090703@tastapod.com> <6fc165060707021510p28e87cfaha005ac5e7bf5edd9@mail.gmail.com> Message-ID: <468ABA20.4030608@tastapod.com> Jake Benilov wrote: > [...] I still got > failures on the OS X box. I shall investigate further. > Curious. I'd appreciate you taking a look into this. Do you have an older rspec on your load path? > Regarding the rspec being baked in, would it be worth making the > dependency explicit perhaps? There's a gem dependency on rspec > 1.0.1 which I thought would automagically update rspec. Maybe it did but it required > 1.0.3, or maybe I don't understand how gem dependencies work. Either of these is likely! If I run gem dep rbehave I get: Gem rbehave-0.3.0 rspec (> 1.0.1) So perhaps the repackaging of the matchers happened between 1.0.1 and 1.0.3. Cheers, Dan > On 7/2/07, Dan North wrote: > >> Hi Jake. >> >> Which version of the rbehave gem are you using? I ran your code verbatim >> using rbehave 0.3.0 with rspec versions 1.0.3 and 1.0.5 and it works ok for >> me: >> >> $ cat jake.rb >> >> require 'rubygems' >> require 'rbehave' >> require 'spec' >> >> Story "Test", %(test story) do >> Scenario "rspec is used" do >> When "the scenario uses an rspec matcher" do >> [1,2,3].should have(3).items >> end >> end >> end >> >> $ ruby jake.rb >> >> Running 1 scenarios: >> . >> >> 1 scenarios: 1 succeeded, 0 failed, 0 pending >> >> Can you double-check your versions of rbehave and rspec please? I know >> rspec's matchers got repackaged not so long ago, so that might be affecting >> things. If so, updating both gems to the latest versions should fix it. >> >> Also, you don't need to require 'spec' for the matchers because rbehave >> bakes that in anyway. >> >> I'm on holiday so I'll be checking mail infrequently. >> >> Thanks, >> Dan >> >> >> >> Jake Benilov wrote: >> Hi Dan, >> >> Thank you for your hints. I gave it another go, and am still having >> problems. Here is a simple example: >> >> ~~~~~ >> require 'rubygems' >> require 'rbehave' >> require 'spec' >> >> Story "Test", %(test story) do >> Scenario "rspec is used" do >> When "the scenario uses an rspec matcher" do >> [1,2,3].should have(3).items >> end >> end >> end >> ~~~~ >> This only works if I add the workaround that you suggested: >> >> module RBehave::World >> include Spec::Matchers >> end >> >> Am I doing something wrong? >> Regards, >> Jake >> >> On 6/27/07, Dan North wrote: >> >> >> Hi Jake. >> >> I just realised I wasn't subscribed to the users list! I've updated rbehave >> to support rspec custom matchers (basically anything included in >> Spec::Matchers). >> >> There's a new gem (0.3.0) available on rubyforge. Please give it a try and >> let me know how you get on. >> >> I agree - I would love to see rspec+rbehave become the suite of choice for >> acceptance testing. >> >> Cheers, >> Dan >> _______________________________________________ >> rbehave-users mailing list >> rbehave-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rbehave-users >> >> >> >> _______________________________________________ >> rbehave-users mailing list >> rbehave-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rbehave-users >> >> >> >> _______________________________________________ >> rbehave-users mailing list >> rbehave-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rbehave-users >> >> >> > _______________________________________________ > rbehave-users mailing list > rbehave-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rbehave-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rbehave-users/attachments/20070703/2e3eef76/attachment-0001.html From for-rbehave at nicware.com Tue Jul 3 18:40:16 2007 From: for-rbehave at nicware.com (Niclas Nilsson) Date: Wed, 4 Jul 2007 00:40:16 +0200 Subject: [rbehave-users] combining rspec and rbehave In-Reply-To: <468ABA20.4030608@tastapod.com> References: <1182959609.8906.10.camel@kyle> <6fc165060707010207l40deae22iec10187436f9aad2@mail.gmail.com> <4688B8B2.6090703@tastapod.com> <6fc165060707021510p28e87cfaha005ac5e7bf5edd9@mail.gmail.com> <468ABA20.4030608@tastapod.com> Message-ID: Some repackaging is probably the case. I just tried Jakes code on OS X with rbehave 0.2.1 and rspec 1.0.0 - didn't work. I upgraded the gems (rbehave 0.3.0 and rspec 1.0.5) and it works. Kind regards Niclas --- blog: http://niclasnilsson.se/ On 3 jul 2007, at 23.05, Dan North wrote: > Jake Benilov wrote: >> [...] I still got >> failures on the OS X box. I shall investigate further. >> > Curious. I'd appreciate you taking a look into this. Do you have an > older rspec on your load path? >> Regarding the rspec being baked in, would it be worth making the >> dependency explicit perhaps? > There's a gem dependency on rspec > 1.0.1 which I thought would > automagically update rspec. Maybe it did but it required > 1.0.3, > or maybe I don't understand how gem dependencies work. Either of > these is likely! > > If I run gem dep rbehave I get: > > Gem rbehave-0.3.0 > rspec (> 1.0.1) > > So perhaps the repackaging of the matchers happened between 1.0.1 > and 1.0.3. > > Cheers, > Dan >> On 7/2/07, Dan North wrote: >> >>> Hi Jake. >>> >>> Which version of the rbehave gem are you using? I ran your code >>> verbatim >>> using rbehave 0.3.0 with rspec versions 1.0.3 and 1.0.5 and it >>> works ok for >>> me: >>> >>> $ cat jake.rb >>> >>> require 'rubygems' >>> require 'rbehave' >>> require 'spec' >>> >>> Story "Test", %(test story) do >>> Scenario "rspec is used" do >>> When "the scenario uses an rspec matcher" do >>> [1,2,3].should have(3).items >>> end >>> end >>> end >>> >>> $ ruby jake.rb >>> >>> Running 1 scenarios: >>> . >>> >>> 1 scenarios: 1 succeeded, 0 failed, 0 pending >>> >>> Can you double-check your versions of rbehave and rspec please? >>> I know >>> rspec's matchers got repackaged not so long ago, so that might be >>> affecting >>> things. If so, updating both gems to the latest versions should >>> fix it. >>> >>> Also, you don't need to require 'spec' for the matchers because >>> rbehave >>> bakes that in anyway. >>> >>> I'm on holiday so I'll be checking mail infrequently. >>> >>> Thanks, >>> Dan >>> >>> >>> >>> Jake Benilov wrote: >>> Hi Dan, >>> >>> Thank you for your hints. I gave it another go, and am still having >>> problems. Here is a simple example: >>> >>> ~~~~~ >>> require 'rubygems' >>> require 'rbehave' >>> require 'spec' >>> >>> Story "Test", %(test story) do >>> Scenario "rspec is used" do >>> When "the scenario uses an rspec matcher" do >>> [1,2,3].should have(3).items >>> end >>> end >>> end >>> ~~~~ >>> This only works if I add the workaround that you suggested: >>> >>> module RBehave::World >>> include Spec::Matchers >>> end >>> >>> Am I doing something wrong? >>> Regards, >>> Jake >>> >>> On 6/27/07, Dan North wrote: >>> >>> >>> Hi Jake. >>> >>> I just realised I wasn't subscribed to the users list! I've >>> updated rbehave >>> to support rspec custom matchers (basically anything included in >>> Spec::Matchers). >>> >>> There's a new gem (0.3.0) available on rubyforge. Please give it >>> a try and >>> let me know how you get on. >>> >>> I agree - I would love to see rspec+rbehave become the suite of >>> choice for >>> acceptance testing. >>> >>> Cheers, >>> Dan >>> _______________________________________________ >>> rbehave-users mailing list >>> rbehave-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rbehave-users >>> >>> >>> >>> _______________________________________________ >>> rbehave-users mailing list >>> rbehave-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rbehave-users >>> >>> >>> >>> _______________________________________________ >>> rbehave-users mailing list >>> rbehave-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rbehave-users >>> >>> >>> >> _______________________________________________ >> rbehave-users mailing list >> rbehave-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rbehave-users >> > > _______________________________________________ > rbehave-users mailing list > rbehave-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rbehave-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rbehave-users/attachments/20070704/43f0c10c/attachment.html From for-rbehave at nicware.com Tue Jul 3 18:42:48 2007 From: for-rbehave at nicware.com (Niclas Nilsson) Date: Wed, 4 Jul 2007 00:42:48 +0200 Subject: [rbehave-users] combining rspec and rbehave In-Reply-To: References: <1182959609.8906.10.camel@kyle> <6fc165060707010207l40deae22iec10187436f9aad2@mail.gmail.com> <4688B8B2.6090703@tastapod.com> <6fc165060707021510p28e87cfaha005ac5e7bf5edd9@mail.gmail.com> <468ABA20.4030608@tastapod.com> Message-ID: <4B00D46F-C48A-4670-80E8-EB94BFCE8AAC@nicware.com> And by the way, updating rbehave pulled rspec along with it, so that works as intended. /Niclas --- blog: http://niclasnilsson.se/ On 4 jul 2007, at 00.40, Niclas Nilsson wrote: > Some repackaging is probably the case. > > I just tried Jakes code on OS X with rbehave 0.2.1 and rspec 1.0.0 > - didn't work. > > I upgraded the gems (rbehave 0.3.0 and rspec 1.0.5) and it works. > > Kind regards > Niclas > > --- > blog: http://niclasnilsson.se/ > > > > On 3 jul 2007, at 23.05, Dan North wrote: > >> Jake Benilov wrote: >>> [...] I still got >>> failures on the OS X box. I shall investigate further. >>> >> Curious. I'd appreciate you taking a look into this. Do you have >> an older rspec on your load path? >>> Regarding the rspec being baked in, would it be worth making the >>> dependency explicit perhaps? >> There's a gem dependency on rspec > 1.0.1 which I thought would >> automagically update rspec. Maybe it did but it required > 1.0.3, >> or maybe I don't understand how gem dependencies work. Either of >> these is likely! >> >> If I run gem dep rbehave I get: >> >> Gem rbehave-0.3.0 >> rspec (> 1.0.1) >> >> So perhaps the repackaging of the matchers happened between 1.0.1 >> and 1.0.3. >> >> Cheers, >> Dan >>> On 7/2/07, Dan North wrote: >>> >>>> Hi Jake. >>>> >>>> Which version of the rbehave gem are you using? I ran your code >>>> verbatim >>>> using rbehave 0.3.0 with rspec versions 1.0.3 and 1.0.5 and it >>>> works ok for >>>> me: >>>> >>>> $ cat jake.rb >>>> >>>> require 'rubygems' >>>> require 'rbehave' >>>> require 'spec' >>>> >>>> Story "Test", %(test story) do >>>> Scenario "rspec is used" do >>>> When "the scenario uses an rspec matcher" do >>>> [1,2,3].should have(3).items >>>> end >>>> end >>>> end >>>> >>>> $ ruby jake.rb >>>> >>>> Running 1 scenarios: >>>> . >>>> >>>> 1 scenarios: 1 succeeded, 0 failed, 0 pending >>>> >>>> Can you double-check your versions of rbehave and rspec please? >>>> I know >>>> rspec's matchers got repackaged not so long ago, so that might >>>> be affecting >>>> things. If so, updating both gems to the latest versions should >>>> fix it. >>>> >>>> Also, you don't need to require 'spec' for the matchers because >>>> rbehave >>>> bakes that in anyway. >>>> >>>> I'm on holiday so I'll be checking mail infrequently. >>>> >>>> Thanks, >>>> Dan >>>> >>>> >>>> >>>> Jake Benilov wrote: >>>> Hi Dan, >>>> >>>> Thank you for your hints. I gave it another go, and am still having >>>> problems. Here is a simple example: >>>> >>>> ~~~~~ >>>> require 'rubygems' >>>> require 'rbehave' >>>> require 'spec' >>>> >>>> Story "Test", %(test story) do >>>> Scenario "rspec is used" do >>>> When "the scenario uses an rspec matcher" do >>>> [1,2,3].should have(3).items >>>> end >>>> end >>>> end >>>> ~~~~ >>>> This only works if I add the workaround that you suggested: >>>> >>>> module RBehave::World >>>> include Spec::Matchers >>>> end >>>> >>>> Am I doing something wrong? >>>> Regards, >>>> Jake >>>> >>>> On 6/27/07, Dan North wrote: >>>> >>>> >>>> Hi Jake. >>>> >>>> I just realised I wasn't subscribed to the users list! I've >>>> updated rbehave >>>> to support rspec custom matchers (basically anything included in >>>> Spec::Matchers). >>>> >>>> There's a new gem (0.3.0) available on rubyforge. Please give >>>> it a try and >>>> let me know how you get on. >>>> >>>> I agree - I would love to see rspec+rbehave become the suite of >>>> choice for >>>> acceptance testing. >>>> >>>> Cheers, >>>> Dan >>>> _______________________________________________ >>>> rbehave-users mailing list >>>> rbehave-users at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/rbehave-users >>>> >>>> >>>> >>>> _______________________________________________ >>>> rbehave-users mailing list >>>> rbehave-users at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/rbehave-users >>>> >>>> >>>> >>>> _______________________________________________ >>>> rbehave-users mailing list >>>> rbehave-users at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/rbehave-users >>>> >>>> >>>> >>> _______________________________________________ >>> rbehave-users mailing list >>> rbehave-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rbehave-users >>> >> >> _______________________________________________ >> rbehave-users mailing list >> rbehave-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rbehave-users > > _______________________________________________ > rbehave-users mailing list > rbehave-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rbehave-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rbehave-users/attachments/20070704/fb823158/attachment.html From dan at tastapod.com Fri Jul 6 17:37:56 2007 From: dan at tastapod.com (Dan North) Date: Fri, 06 Jul 2007 22:37:56 +0100 Subject: [rbehave-users] combining rspec and rbehave In-Reply-To: <4B00D46F-C48A-4670-80E8-EB94BFCE8AAC@nicware.com> References: <1182959609.8906.10.camel@kyle> <6fc165060707010207l40deae22iec10187436f9aad2@mail.gmail.com> <4688B8B2.6090703@tastapod.com> <6fc165060707021510p28e87cfaha005ac5e7bf5edd9@mail.gmail.com> <468ABA20.4030608@tastapod.com> <4B00D46F-C48A-4670-80E8-EB94BFCE8AAC@nicware.com> Message-ID: <468EB634.80301@tastapod.com> Hi Niclas. Welcome to the list! Niclas Nilsson wrote: > And by the way, updating rbehave pulled rspec along with it, so that > works as intended. > > /Niclas > > --- > blog: http://niclasnilsson.se/ > > On 4 jul 2007, at 00.40, Niclas Nilsson wrote: > >> Some repackaging is probably the case. >> >> I just tried Jakes code on OS X with rbehave 0.2.1 and rspec 1.0.0 - >> didn't work. >> >> I upgraded the gems (rbehave 0.3.0 and rspec 1.0.5) and it works. >> >> Kind regards >> Niclas >> >> --- >> blog: http://niclasnilsson.se/ >> >> >> >> On 3 jul 2007, at 23.05, Dan North wrote: >> >>> Jake Benilov wrote: >>>> [...] I still got >>>> failures on the OS X box. I shall investigate further. >>>> >>> Curious. I'd appreciate you taking a look into this. Do you have an >>> older rspec on your load path? >>>> Regarding the rspec being baked in, would it be worth making the >>>> dependency explicit perhaps? >>> There's a gem dependency on rspec > 1.0.1 which I thought would >>> automagically update rspec. Maybe it did but it required > 1.0.3, or >>> maybe I don't understand how gem dependencies work. Either of these >>> is likely! >>> >>> If I run gem dep rbehave I get: >>> >>> Gem rbehave-0.3.0 >>> rspec (> 1.0.1) >>> >>> So perhaps the repackaging of the matchers happened between 1.0.1 >>> and 1.0.3. >>> >>> Cheers, >>> Dan >>>> On 7/2/07, Dan North wrote: >>>> >>>>> Hi Jake. >>>>> >>>>> Which version of the rbehave gem are you using? I ran your code verbatim >>>>> using rbehave 0.3.0 with rspec versions 1.0.3 and 1.0.5 and it works ok for >>>>> me: >>>>> >>>>> $ cat jake.rb >>>>> >>>>> require 'rubygems' >>>>> require 'rbehave' >>>>> require 'spec' >>>>> >>>>> Story "Test", %(test story) do >>>>> Scenario "rspec is used" do >>>>> When "the scenario uses an rspec matcher" do >>>>> [1,2,3].should have(3).items >>>>> end >>>>> end >>>>> end >>>>> >>>>> $ ruby jake.rb >>>>> >>>>> Running 1 scenarios: >>>>> . >>>>> >>>>> 1 scenarios: 1 succeeded, 0 failed, 0 pending >>>>> >>>>> Can you double-check your versions of rbehave and rspec please? I know >>>>> rspec's matchers got repackaged not so long ago, so that might be affecting >>>>> things. If so, updating both gems to the latest versions should fix it. >>>>> >>>>> Also, you don't need to require 'spec' for the matchers because rbehave >>>>> bakes that in anyway. >>>>> >>>>> I'm on holiday so I'll be checking mail infrequently. >>>>> >>>>> Thanks, >>>>> Dan >>>>> >>>>> >>>>> >>>>> Jake Benilov wrote: >>>>> Hi Dan, >>>>> >>>>> Thank you for your hints. I gave it another go, and am still having >>>>> problems. Here is a simple example: >>>>> >>>>> ~~~~~ >>>>> require 'rubygems' >>>>> require 'rbehave' >>>>> require 'spec' >>>>> >>>>> Story "Test", %(test story) do >>>>> Scenario "rspec is used" do >>>>> When "the scenario uses an rspec matcher" do >>>>> [1,2,3].should have(3).items >>>>> end >>>>> end >>>>> end >>>>> ~~~~ >>>>> This only works if I add the workaround that you suggested: >>>>> >>>>> module RBehave::World >>>>> include Spec::Matchers >>>>> end >>>>> >>>>> Am I doing something wrong? >>>>> Regards, >>>>> Jake >>>>> >>>>> On 6/27/07, Dan North wrote: >>>>> >>>>> >>>>> Hi Jake. >>>>> >>>>> I just realised I wasn't subscribed to the users list! I've updated rbehave >>>>> to support rspec custom matchers (basically anything included in >>>>> Spec::Matchers). >>>>> >>>>> There's a new gem (0.3.0) available on rubyforge. Please give it a try and >>>>> let me know how you get on. >>>>> >>>>> I agree - I would love to see rspec+rbehave become the suite of choice for >>>>> acceptance testing. >>>>> >>>>> Cheers, >>>>> Dan >>>>> _______________________________________________ >>>>> rbehave-users mailing list >>>>> rbehave-users at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/rbehave-users >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> rbehave-users mailing list >>>>> rbehave-users at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/rbehave-users >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> rbehave-users mailing list >>>>> rbehave-users at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/rbehave-users >>>>> >>>>> >>>>> >>>> _______________________________________________ >>>> rbehave-users mailing list >>>> rbehave-users at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/rbehave-users >>>> >>> >>> _______________________________________________ >>> rbehave-users mailing list >>> rbehave-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rbehave-users >> >> _______________________________________________ >> rbehave-users mailing list >> rbehave-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rbehave-users > > ------------------------------------------------------------------------ > > _______________________________________________ > rbehave-users mailing list > rbehave-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rbehave-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rbehave-users/attachments/20070706/21cec9aa/attachment-0001.html From benilov at gmail.com Sat Jul 14 12:30:03 2007 From: benilov at gmail.com (Jake Benilov) Date: Sat, 14 Jul 2007 18:30:03 +0200 Subject: [rbehave-users] Defining blocks only once Message-ID: <6fc165060707140930h64e2396dkda9200273035e013@mail.gmail.com> Hi Dan, I would like to write an acceptance test for a workflow, and would like to do the following: ~~~~ require 'rubygems' require 'rbehave' Story "Test for reusing blocks", %(As a test writer, I would like to be able to reuse blocks i've already defined in 'when' for 'given') do Scenario "1" do Given "A" do end When "B" do end Then "C" do end end Scenario "2" do Given "A" Given "B" When "C" Then "D" do end end end ~~~~ However when I reuse the B block in scenario 2, it's not being recognised. Keeping with the DRY principle, is it possible to make all blocks that you've defined earlier reusable? Thanks again, Jake From dan at tastapod.com Wed Jul 18 13:31:27 2007 From: dan at tastapod.com (dan at tastapod.com) Date: Wed, 18 Jul 2007 18:31:27 +0100 (BST) Subject: [rbehave-users] Defining blocks only once In-Reply-To: <6fc165060707140930h64e2396dkda9200273035e013@mail.gmail.com> References: <6fc165060707140930h64e2396dkda9200273035e013@mail.gmail.com> Message-ID: <50570.147.114.226.182.1184779887.squirrel@www.tastapod.com> Hi Jake. Each step (given, event or outcome) is stored in a separate hash, so it doesn't matter if their names collide. However I quite like the idea that an event in one scenario can become a given in another, so I'm open to the idea that we could store them all in one place. On the other hand, have you seen GivenScenario? This allows you to use an entire scenario as a given to another scenario. You identify it by name: Scenario "something happens" do ... end Scenario "something else happens" do GivenScenario "something happens" ... end There's an example in the game-of-life sample code. Let me know if this helps, because I would prefer not to put all the different event types in the same bucket. Cheers, Dan > Hi Dan, > > I would like to write an acceptance test for a workflow, and would > like to do the following: > > ~~~~ > require 'rubygems' > require 'rbehave' > > Story "Test for reusing blocks", > %(As a test writer, I would like to be > able to reuse blocks i've already defined > in 'when' for 'given') do > > Scenario "1" do > Given "A" do end > When "B" do end > Then "C" do end > end > > Scenario "2" do > Given "A" > Given "B" > When "C" > Then "D" do end > end > end > ~~~~ > However when I reuse the B block in scenario 2, it's not being recognised. > Keeping with the DRY principle, is it possible to make all blocks that > you've defined earlier reusable? > > Thanks again, > Jake > _______________________________________________ > rbehave-users mailing list > rbehave-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rbehave-users > From michael.s.klishin at gmail.com Fri Jul 27 14:49:46 2007 From: michael.s.klishin at gmail.com (Michael Klishin) Date: Fri, 27 Jul 2007 22:49:46 +0400 Subject: [rbehave-users] RBehave is wonderful, now what about Rake tasks for Rails development? Message-ID: <709de1d10707271149t2e54f02bt84c2313851d9d17c@mail.gmail.com> I've been using RBehave for a while on Ruby project and I must confess I'm impressed with it. But now when I decided to use it together with RSpec for Rails development it seems a bit confusing what is the best way to tie this to CI tools like CruiseControl.rb. Are there any Rake tasks for RBehave out or should it be written from scratch? Thanks in advance. -- MK