Re: [rspec-users] how to write nested XPath matchers

2009-02-16 Thread Phlip
The same error message for a stray nil: This attempt, calling simple_matcher directly, gives nearly the same nil: def be_xml_with_(&block) waz_xdoc = @xdoc simple_matcher 'yo' do |given, matcher| wrap_expectation matcher do assert_xhtml given # this works block

Re: [rspec-users] how to write nested XPath matchers

2009-02-16 Thread Phlip
David Chelimsky wrote: When RSpec is used as customer facing, they see the docstrings (strings passed to describe() and it()), not the internal code. That's for developers. Then why the .should stuff? I'm a developer - technically - and I never needed it! But enough sophistry: Back to busine

Re: [rspec-users] [Cucumber, rspec-rails] uninitialized constant ActionController::UrlEncodedPairParser

2009-02-16 Thread David Chelimsky
Sent from my iPhone On Feb 16, 2009, at 4:42 PM, Mike Gaffney wrote: They are now using using the parser in Rack. Likely Rspec doesn't have this yet on a release or possibly even master. Actually we do. Grab the latest! Take a look at: http://webrat.lighthouseapp.com/projects/10503/t

Re: [rspec-users] [Cucumber, rspec-rails] uninitialized constant ActionController::UrlEncodedPairParser

2009-02-16 Thread s.ross
Applying this patch to webrat: http://webrat.lighthouseapp.com/attachments/87914/lh_161.diff did the trick for 2.2.2 and 2.3. Eek! :) On Feb 16, 2009, at 2:57 PM, Josh Knowles wrote: On Mon, Feb 16, 2009 at 5:28 PM, David Chelimsky wrote: The latest gems from github work with rails 2.3:

Re: [rspec-users] [Cucumber, rspec-rails] uninitialized constant ActionController::UrlEncodedPairParser

2009-02-16 Thread Josh Knowles
On Mon, Feb 16, 2009 at 5:28 PM, David Chelimsky wrote: > The latest gems from github work with rails 2.3: The problem is in Webrat. I have a hack in my fork, but we need to figure out a longer-term solution. Bug is open, hopefully we can knock it out this week. Patches welcome. -- Josh Know

Re: [rspec-users] [Cucumber, rspec-rails] uninitialized constant ActionController::UrlEncodedPairParser

2009-02-16 Thread Mike Gaffney
They are now using using the parser in Rack. Likely Rspec doesn't have this yet on a release or possibly even master. Take a look at: http://webrat.lighthouseapp.com/projects/10503/tickets/161-urlencodedpairparser-removed-in-edge-rails For a similar patch. -Mike s.ross wrote: It seems there

Re: [rspec-users] [Cucumber, rspec-rails] uninitialized constant ActionController::UrlEncodedPairParser

2009-02-16 Thread David Chelimsky
Sent from my iPhone On Feb 16, 2009, at 4:17 PM, "s.ross" wrote: It seems there's a known anomaly between rspec-rails and Rails 2.3. That causes the error "uninitialized constant ActionController::UrlEncodedPairParser". I know there is a fix in somebody's repo, but what's the best way t

[rspec-users] [Cucumber] 0 scenarios running "dirty" features in Autotest

2009-02-16 Thread Tom Hoen
When running autotest with AUTOFEATURE=true, all of my specs and features run fine. However, if I have a feature containing a scenario that fails, autotest lists that feature, but then returns "0 scenarios", and then runs all of the features again. Any idea why this might be? Best, Tom -- Poste

Re: [rspec-users] [RSpec] #and_raise

2009-02-16 Thread David Chelimsky
On Mon, Feb 16, 2009 at 1:48 PM, Nick Hoffman wrote: > I often use #and_raise like so: > > @error_message = 'Some error' > @sf.should_receive(:shift_time!).and_raise @error_message > > However, after trying to do this: > > @argument_error = mock_model ArgumentError, >:message => @error_message

[rspec-users] [Cucumber, rspec-rails] uninitialized constant ActionController::UrlEncodedPairParser

2009-02-16 Thread s.ross
It seems there's a known anomaly between rspec-rails and Rails 2.3. That causes the error "uninitialized constant ActionController::UrlEncodedPairParser". I know there is a fix in somebody's repo, but what's the best way to get a working gem version of webrat/cucumber/rspec/rspec-rails that

[rspec-users] [RSpec] #and_raise

2009-02-16 Thread Nick Hoffman
I often use #and_raise like so: @error_message = 'Some error' @sf.should_receive(:shift_time!).and_raise @error_message However, after trying to do this: @argument_error = mock_model ArgumentError, :message => @error_message @sf.should_receive(:shift_time!).and_raise @argument_error and th

Re: [rspec-users] how to write nested XPath matchers

2009-02-16 Thread David Chelimsky
On Mon, Feb 16, 2009 at 9:36 AM, Phlip wrote: >> This looks pretty cool. I wonder if you'd have any interest in making >> this a bit more rspec-friendly? Something like an option to run it >> like this: > > Here's the spec. The sauce is below my signature. > > it 'should have a user form with the

[rspec-users] how to write nested XPath matchers

2009-02-16 Thread Phlip
This looks pretty cool. I wonder if you'd have any interest in making this a bit more rspec-friendly? Something like an option to run it like this: Here's the spec. The sauce is below my signature. it 'should have a user form with the first name' do render '/users/new' response.body.s

[rspec-users] [ANN] Merb Mind Maps - a tutorial on RSpec, GraphViz & a little Merb

2009-02-16 Thread Phlip
Netizens: Crispin & Gregory's new book, /Agile Testing: A Practical Guide for Testers and Agile Teams/, has a kewt "mind map" at the start of each chapter. It inspired me to find a way to use the "tag cloud" on a blog to draw a mind map of the posts, linked by their tags in common. The res

Re: [rspec-users] Sinitra and Cucumber

2009-02-16 Thread aslak hellesoy
On Mon, Feb 16, 2009 at 7:39 AM, Andrew Premdas wrote: > Hi all, > > Anyone using cucumber with sinitra (current). Wondering if I need to use > Aslaks sinatra/webrat forks. Also if anyone has a sample app :) > I've created a ticket for it: http://rspec.lighthouseapp.com/projects/16211-cucumber/ti

Re: [rspec-users] cucumber hooks BeforeAll and AfterAll

2009-02-16 Thread Joaquin Rivera Padron
cool thanks, joaquin 2009/2/15 Ben Mabey > Zach Dennis wrote: > >> On Sun, Feb 15, 2009 at 2:21 PM, Joaquin Rivera Padron >> wrote: >> >> >>> hey there, >>> the short version: >>> right now Cucumber provides hooks Before and After to be run around every >>> step, I have notice some use case whe

Re: [rspec-users] cucumber hooks BeforeAll and AfterAll

2009-02-16 Thread aslak hellesoy
On Sun, Feb 15, 2009 at 8:47 PM, Ben Mabey wrote: > Zach Dennis wrote: >> >> On Sun, Feb 15, 2009 at 2:21 PM, Joaquin Rivera Padron >> wrote: >> >>> >>> hey there, >>> the short version: >>> right now Cucumber provides hooks Before and After to be run around every >>> step, I have notice some use

Re: [rspec-users] [Cucumber] running `cucumber` without a gem

2009-02-16 Thread Bart Zonneveld
On 14-feb-2009, at 17:43, Zach Dennis wrote: Is your file path wrong? I see: $:.unshift 'vendor/gems/cucumber-0.1.6/lib' Shouldn't that be: $:.unshift 'vendor/gems/cucumber-0.1.16/lib' D'oh! Great catch! However, it still doesn't work :(. See http://gist.github.com/65073 It loads cuc