lundi 31 août 2015

How do I find a fixture's name, given an id in Rails tests?

Rails provides a method for looking up an ID given a fixture's name:

See [ActiveRecord::FixtureSet.identify](http://ift.tt/1Q51HVG

Suppose, in a failing test, I'd like to print out the name of a problematic fixture given it's ID. How do I do the reverse lookup?

Aucun commentaire:

Enregistrer un commentaire