Assert_latest now takes "polygamous" arguments


Those of you who dig ActiveRecord need this:

It shows how to write tests like this:

 t, fz = assert_latest T2, Foo do
           2.times{ Foo.create }

 assert do > 0     and
   fz[0].id > 0 and
   fz[1].id > fz[0].id

The inner lines - T2.create etc. - represent your production code in
action. You
put the assert_latest around that code, and it will detect any new
records of
the given type. You can then assert the records have the fields you

This is useful for any kind of testing, but super-useful for integration
to detect large batches of new records.

Get assert_latest with the assert_efficient_sql gem.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs