Jeff DeanJeff Dean
ActiveHash is now much easier to test
edit Posted by Jeff Dean on Monday October 26, 2009 at 08:23PM

I recently released a new version of ActiveHash which adds a number of features that make it even easier to use Hash or Yaml data stores for ActiveRecord-esque models. The recent updates include:

  • Setters
  • belongs_to and has_many associations
  • save, create and destroy methods that add or remove the objects from the in-memory collection (great for object mother libraries like Fixjour)
  • support for string ids
  • support for hash-style yaml data (think Rails fixtures)
  • auto-incrementing ids by default (again, for Rails fixtures)

If you have earlier versions of ActiveHash I highly recommend that you upgrade. It makes testing and common uses much nicer. If you are on gemcutter, it's as simple as:

gem install active_hash

Enjoy!