CrossSpecRails
Short description and motivation.
Usage
Mount the engine in your routes file like
mount CrossSpecRails::Engine, at: "/cross_spec"
Requesting factory data over http
curl -X POST http://localhost:5020/cross_spec/factories/user
Note the URL namespace from the routes.rb of cross_spec
followed by the /factories
path followed by the name of your factory.
You can also specify attributes for the factory using a query string like
curl -X POST http://localhost:5020/cross_spec/factories/[email protected]&name=Julie
Traits are supported as well
curl -X POST http://localhost:5020/cross_spec/factories/user?traits[]=admin&traits[]=with_articles
The data doesn't have to be in the query string it can be part of the request body as well (it uses what is available in the params hash).
Installation
Add this line to your application's Gemfile:
gem 'cross_spec_rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cross_spec_rails
Contributing
Contribution directions go here.
License
The gem is available as open source under the terms of the MIT License.