Re: [rspec-users] how to write complex matchers

2009-02-15 Thread Phlip
Yury Kotlyarov wrote: Phlip wrote: Yury Kotlyarov wrote: http://github.com/yura/howto-rspec-custom-matchers/ The project aims to encourage feedback on the best practices of creating custom expectation matchers and specs for them. Does it make sense? That just says it's a "project". One

Re: [rspec-users] how to write complex matchers

2009-02-14 Thread Yury Kotlyarov
Phlip wrote: Yury Kotlyarov wrote: http://github.com/yura/howto-rspec-custom-matchers/ The project aims to encourage feedback on the best practices of creating custom expectation matchers and specs for them. Does it make sense? That just says it's a "project". One git clone later... It

Re: [rspec-users] how to write complex matchers

2009-02-14 Thread Phlip
Yury Kotlyarov wrote: http://github.com/yura/howto-rspec-custom-matchers/ The project aims to encourage feedback on the best practices of creating custom expectation matchers and specs for them. Does it make sense? That just says it's a "project". One git clone later... It is a Rails 2.3

Re: [rspec-users] how to write complex matchers

2009-02-14 Thread Yury Kotlyarov
Phlip wrote: http://github.com/yura/howto-rspec-custom-matchers/ RSpec is a library ;-) Please try again: What is that source code drop. A website? A library? or something else? ok - from README: The project aims to encourage feedback on the best practices of creating custom expectat

Re: [rspec-users] how to write complex matchers

2009-02-14 Thread Phlip
http://github.com/yura/howto-rspec-custom-matchers/ RSpec is a library ;-) Please try again: What is that source code drop. A website? A library? or something else? ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mail

Re: [rspec-users] how to write complex matchers

2009-02-14 Thread Yury Kotlyarov
Phlip wrote: Yury Kotlyarov wrote: The major problem is fixed: http://github.com/yura/howto-rspec-custom-matchers/ Apologies if I missed something, but is that a howto or a library? Do I git it and run it to ... learn to customize matchers? RSpec is a library ;-) And I have some issues

Re: [rspec-users] how to write complex matchers

2009-02-14 Thread Phlip
Yury Kotlyarov wrote: The major problem is fixed: http://github.com/yura/howto-rspec-custom-matchers/ Apologies if I missed something, but is that a howto or a library? Do I git it and run it to ... learn to customize matchers? ___ rspec-users mai

Re: [rspec-users] how to write complex matchers

2009-02-14 Thread Yury Kotlyarov
Phlip wrote: David Chelimsky 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: expect_xpath do It's on my do-list, but... ...are pluggable matchers as hard to write as the OP implied? Ho

Re: [rspec-users] how to write complex matchers

2009-02-13 Thread Phlip
David Chelimsky 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: expect_xpath do It's on my do-list, but... ...are pluggable matchers as hard to write as the OP implied? How would you fi

Re: [rspec-users] how to write complex matchers

2009-02-13 Thread David Chelimsky
On Fri, Feb 13, 2009 at 1:53 PM, Phlip wrote: > Yury Kotlyarov wrote: > >> it "should have form with input fields" do >> render ... >> response.should have_form(users_path) do >> with_field_set 'Personal Information' do >> with_text_field 'First name', 'user[first_name]' >> ... >> en

Re: [rspec-users] how to write complex matchers

2009-02-13 Thread Phlip
Yury Kotlyarov wrote: it "should have form with input fields" do render ... response.should have_form(users_path) do with_field_set 'Personal Information' do with_text_field 'First name', 'user[first_name]' ... end end end The minor problem with that system is it forces your

Re: [rspec-users] how to write complex matchers

2009-02-12 Thread Yury Kotlyarov
Yury Kotlyarov wrote: SOLVED! just need to pass matched result to inner block. gist: http://gist.github.com/62562 Many thanks, Yury I was wrong. It yields just one last line from the inner block. It passes following: it "should have form to create a new user" do render '/users/new'

Re: [rspec-users] how to write complex matchers

2009-02-12 Thread Yury Kotlyarov
SOLVED! just need to pass matched result to inner block. gist: http://gist.github.com/62562 Many thanks, Yury ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] how to write complex matchers

2009-02-12 Thread Yury Kotlyarov
David Chelimsky wrote: On Thu, Feb 12, 2009 at 5:52 AM, Yury Kotlyarov wrote: Hi, I am trying to write custom matcher which accepts block to spec views with forms/fieldsets/inputs eg view: --- Personal Information First name ... spec: --- it "shou

Re: [rspec-users] how to write complex matchers

2009-02-12 Thread David Chelimsky
On Thu, Feb 12, 2009 at 5:52 AM, Yury Kotlyarov wrote: > Hi, > > I am trying to write custom matcher which accepts block to spec views with > forms/fieldsets/inputs eg > > view: > --- > > > Personal Information > > > First name > > > ... > > > > > spec: > -