From benilov at gmail.com Sat Jun 23 18:03:17 2007 From: benilov at gmail.com (Jake Benilov) Date: Sun, 24 Jun 2007 00:03:17 +0200 Subject: [rbehave-users] combining rspec and rbehave Message-ID: <6fc165060706231503k1851b7b6n913fc66e8269dc82@mail.gmail.com> Hi, I'm having trouble with the following story: ~~~~~~~ require 'rubygems' require 'rbehave' require 'spec' require 'madlibs_game' Story "The Madlibs Game", %(As a player, I am prompted for placeholders by the interface and the story is then read back to me) do Scenario "only one placeholder" do Given "the story with placeholders is", "Our favourite language is ((a gemstone))" do |story| @story = story end When "I start the game" do @game = MadlibsGame.new(@story) end Then "the game prompts me to enter", "a gemstone" do |expected_prompt| @game.prompt.should match(/expected_prompt/) end end end ~~~~~~~ The "match" (part of Spec::Matchers from rspec) is not being recognised; any hints as to what I can try to get this to work? Thanks in advance, Jake From peter at tastydiff.com Sun Jun 24 08:08:03 2007 From: peter at tastydiff.com (Peter Baker) Date: Sun, 24 Jun 2007 13:08:03 +0100 Subject: [rbehave-users] combining rspec and rbehave In-Reply-To: <6fc165060706231503k1851b7b6n913fc66e8269dc82@mail.gmail.com> References: <6fc165060706231503k1851b7b6n913fc66e8269dc82@mail.gmail.com> Message-ID: <2ef6628f0706240508h553543c6k81c23478ade476cc@mail.gmail.com> Hi Jake, You probably want to use =~ instead. From benilov at gmail.com Sun Jun 24 15:43:14 2007 From: benilov at gmail.com (Jake Benilov) Date: Sun, 24 Jun 2007 21:43:14 +0200 Subject: [rbehave-users] combining rspec and rbehave In-Reply-To: <2ef6628f0706240508h553543c6k81c23478ade476cc@mail.gmail.com> References: <6fc165060706231503k1851b7b6n913fc66e8269dc82@mail.gmail.com> <2ef6628f0706240508h553543c6k81c23478ade476cc@mail.gmail.com> Message-ID: <6fc165060706241243h50483cecs69f754eb99859662@mail.gmail.com> Peter, Thank you for your suggestion. In this specific case your suggestion is fine, but there is the question of RSpec (custom?) matchers that I would like to solve; I think that RBehave + Rspec would make a killer combination for acceptance testing. Regards, Jake On 6/24/07, Peter Baker wrote: > Hi Jake, > > You probably want to use =~ instead. > _______________________________________________ > rbehave-users mailing list > rbehave-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rbehave-users > From dan at tastapod.com Wed Jun 27 11:53:29 2007 From: dan at tastapod.com (Dan North) Date: Wed, 27 Jun 2007 16:53:29 +0100 Subject: [rbehave-users] combining rspec and rbehave Message-ID: <1182959609.8906.10.camel@kyle> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rbehave-users/attachments/20070627/d9c0c70b/attachment.html