Re: [rspec-users] Message expectation that verifies result of passed block

2010-01-28 Thread Matt Wynne
On 28 Jan 2010, at 21:43, Nicolás Sanguinetti wrote: You're definitely testing too much implementation and not enough behavior. Basically, what you want to spec, is that provided some options, when you call a certain method of your form builder, you get a certain html output. At least that's

Re: [rspec-users] Message expectation that verifies result of passed block

2010-01-28 Thread Matt Wynne
On 28 Jan 2010, at 21:14, Paul Hinze wrote: Ashley Moran on 2010-01-28 at 13:28: On Jan 28, 2010, at 1:29 pm, Paul Hinze wrote: I believe the lack of ability to use this notation comes down to a ruby limitation, but I'm not sure. If that's the case, then we would need a specific argume

Re: [rspec-users] Message expectation that verifies result of passed block

2010-01-28 Thread Nicolás Sanguinetti
You're definitely testing too much implementation and not enough behavior. Basically, what you want to spec, is that provided some options, when you call a certain method of your form builder, you get a certain html output. At least that's how I would approach the problem. So I would have somethi

Re: [rspec-users] Message expectation that verifies result of passed block

2010-01-28 Thread Paul Hinze
Ashley Moran on 2010-01-28 at 13:28: > > On Jan 28, 2010, at 1:29 pm, Paul Hinze wrote: > > > I believe the lack of ability to use this notation comes down to a ruby > > limitation, but I'm not sure. If that's the case, then we would need a > > specific argument expectation (along the lines of

Re: [rspec-users] Message expectation that verifies result of passed block

2010-01-28 Thread Ashley Moran
On Jan 28, 2010, at 1:29 pm, Paul Hinze wrote: > I believe the lack of ability to use this notation comes down to a ruby > limitation, but I'm not sure. If that's the case, then we would need a > specific argument expectation (along the lines of my suggestion) that > executes in a context in whi

[rspec-users] Message expectation that verifies result of passed block

2010-01-28 Thread Paul Hinze
Hey speclers, My spec-fu is failing me on a message expectation in which I would like to verify that the block passed to a certain method yields the proper value. I would like to be able to say something like: def bar # .. some code foo do 'bar' # want to verify this value end end des