README.md in faker_maker-1.0.0 vs README.md in faker_maker-1.0.1

- old
+ new

@@ -1,5 +1,10 @@ + +![CircleCI branch](https://img.shields.io/circleci/project/github/BillyRuffian/faker_maker/master.svg?style=flat-square) +[![CodeFactor](https://www.codefactor.io/repository/github/billyruffian/faker_maker/badge?style=flat-square)](https://www.codefactor.io/repository/github/billyruffian/faker_maker) +![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/BillyRuffian/faker_maker.svg?style=flat-square) + # FakerMaker FakerMaker is a simple fixture generator with a concise and straightforward syntax. It is designed to resemble the [FactoryBot](https://github.com/thoughtbot/factory_bot) gem but without needing an existing class definition to back its fixtures and so it goes without saying that it offers no persistence mechanism. Its purpose is to provide a simple framework for generating data to test JSON APIs and is intended to be used with the [Faker](https://github.com/stympy/faker) gem (but has no dependency upon it). @@ -153,10 +158,10 @@ result = FakerMaker[:item].build( name: 'Electric Blanket' ) do |i| i.name = 'Electric Sheep' end ``` -then the value of `i.name` is 'Electric Sheep'. +then the value of `result.name` is 'Electric Sheep'. Beware when overriding values in this way: there is no type checking. You will get an exception if you try to set a value to an attribute that doesn't exist but you won't get one if you assign, say, an array of values where you would otherwise have a string and vice versa. Calling `result.to_json` will give a stringified JSON representation. Because ActiveSupport is used under the covers, `as_json` will give you a `Hash` rather than the stringified version.