Build failure caused by test corruption

Changed code so that it wasn't depending on the order of
method instances retrieved from the DB.
Merge pull request #148 from mkanoor/yaml_export_spec_failure

Build failure caused by test corruption