Re: [rspec-users] fluent chaining drying

2011-05-26 Thread Gustavo Delfino
Thank you so much Justin. Crystal clear now. Regards, Gustavo Delfino On May 26, 2011, at 12:05 AM, Justin Ko wrote: > Actually, the lambda approach won't work, because you're carrying state > (@index & @width) that is outside of scope in the matcher. This is what it > would look like though:

Re: [rspec-users] fluent chaining drying

2011-05-25 Thread Justin Ko
On Wed, May 25, 2011 at 9:30 PM, Gustavo Delfino wrote: > Thank you Justin & David. > > I was able to to use Justin solution. I also tried hard to understand and > use David's solution but I could not. > > Now I am just curious. What is &HaveXXXHelpers.on_column? A reference to a > class method?

Re: [rspec-users] fluent chaining drying

2011-05-25 Thread Gustavo Delfino
Thank you Justin & David. I was able to to use Justin solution. I also tried hard to understand and use David's solution but I could not. Now I am just curious. What is &HaveXXXHelpers.on_column? A reference to a class method? Regards, Gustavo Delfino On May 25, 2011, at 2:04 PM, Justin Ko

Re: [rspec-users] fluent chaining drying

2011-05-25 Thread Justin Ko
On Wed, May 25, 2011 at 11:20 AM, David Chelimsky wrote: > On May 25, 2011, at 10:07 AM, Gustavo Delfino wrote: > > > Hello all. Thanks to subjects, custom matchers and fluent chaining I was > able to greatly simplify my spec. But now I want to DRY my custom matchers. > > > > I have two custom mat

Re: [rspec-users] fluent chaining drying

2011-05-25 Thread David Chelimsky
On May 25, 2011, at 10:07 AM, Gustavo Delfino wrote: > Hello all. Thanks to subjects, custom matchers and fluent chaining I was able > to greatly simplify my spec. But now I want to DRY my custom matchers. > > I have two custom matchers: 'have_text' and 'have_number' and both contain > exactly