Factories that makes JSON
Sometimes, it gets quite annoying while you are testing your API, that accepts JSON. Often the solution in this is to keep JSON data in fixtures and then parse that and provide to endpoint. Maintaining then becomes quite a pain, especial if you have to support complex JSON data types and introduce changes with time. Here is solution:
Utilize power of FactoryGirl while dealing with JSON data. Say hello to FactoryJson
Post a comment