This gem allows you to easily create JSON data fixtures from data schemes you can specify by yourself. The main purpose is to stub JSON received form wide range of JSON API's for testing. And if you use many API's or kind of difficult one you may want to have a tool for easy creation of tons of JSON data you have. And Jafry can helps you here. Just specify data scheme in json file and then you can change your data easly, wrap it namespaces, build lists, etc.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install jafry
Gem is under active development so version 0.2.0 has some breakable changes.
- Create file
- Put json data in it.
- In your
Jafry.build('data_scheme_name')to get object or
Jafry.create('data_scheme_name')to get JSON in your spec.
- Fork it ( https://github.com/[my-github-username]/jafry/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request on