https://github.com/eendroroy/model_2_factory-rails
Generates factories for models
https://github.com/eendroroy/model_2_factory-rails
factory-girl rails ruby
Last synced: about 1 year ago
JSON representation
Generates factories for models
- Host: GitHub
- URL: https://github.com/eendroroy/model_2_factory-rails
- Owner: eendroroy
- License: mit
- Created: 2017-04-21T07:40:11.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-03T17:42:09.000Z (about 9 years ago)
- Last Synced: 2025-04-15T06:08:04.358Z (about 1 year ago)
- Topics: factory-girl, rails, ruby
- Language: Ruby
- Homepage:
- Size: 60.5 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# model_2_factory-rails
[](https://rubygems.org/gems/model_2_factory-rails)
[](https://rubygems.org/gems/model_2_factory-rails)
[](https://travis-ci.org/eendroroy/model_2_factory-rails)
[](https://codeclimate.com/github/eendroroy/model_2_factory-rails)
[](https://github.com/eendroroy/model_2_factory-rails/graphs/contributors)
Factory model class generator for rails model class.
## Description
Generate factory model class from rails active record class for rails-rspec test code.
### Prerequisites
Require following gem to be included in your gem file:
- factory_girl-rails
```
factory_girl-rails
```
### Installing
Add this line to your application's Gemfile:
```
gem 'model_2_factory-rails'
```
And then execute:
```
$ bundle
```
Or install it globally in your system:
```
$ gem install model_2_factory-rails
```
## Usage
To generate factory class for your existing model class
```
$ bundle exec factory_gen your_model_name
```
## Contributing
Bug reports and pull requests are welcome on GitHub at [model_2_factory-rails repository](https://github.com/eendroroy/model_2_factory-rails).
This project is intended to be a safe, welcoming space for collaboration,
and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## Authors
* **Indrajit Roy** - *Initial work* - [eendroroy](https://github.com/eendroroy)
See also the list of [contributors](CONTRIBUTORS.md) who participated in this project.
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feendroroy%2Fmodel_2_factory-rails?ref=badge_large)