assert_difference eval magic in [6693]

I just saw Marcel's change to assert_difference that changes the method API to take a string param that is evaled in a lambda.

I much preferred the old API, since it's simple enough to pass a lambda. Passing a string means the lambda is in the wrong scope and doesn't have access to objects in the test case scope.

For an example of how I was using the old API:

Wouldn't lambda { eval(expression, block.binding) } take care of that?


That's pretty nice, but a lambda and :call is a bit nasty, and I like
the string for simple cases (all the ({}) stuff is a bit like line
noise). I'd take a patch which can accept a string, or a lambda

Any issues with this?

% svn diff
Index: test/test_test.rb