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

2009-02-17 Thread David Chelimsky
On Mon, Feb 16, 2009 at 8:21 PM, Phlip wrote: > 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 - an

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] 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