Don't Write specs yourself.
You might be caught up in the situation where all the development work is done first and then you have to write specs.
The purpose of this gem is to serve as the bootstrap tool where all the known specs are already written for you.
In order to use this gem, the following steps needs to be done before installing this gem.
- install
rspec-rails
gem. Refer to the official page of the gem to know more. - install
shoulda-matchers
gem. Refer to the official page of the gem to know more.
The reason we chose rspec
and shoulda-matcher
is due to their simple and efficient DSL which makes writing tests easier.
Add this line to your application's Gemfile:
gem 'auto_specs'
And then execute:
$ bundle
Or install it yourself as:
$ gem install auto_specs
Upon installation in the rails app, the gem presents you with two rake
tasks namely:
- auto_specs:models
- auto_spec:controllers [TODO]
Running rake auto_specs:models
would generate the model file specs in the spec
directory.
- Fork it ( https://github.com/aditya-kapoor/auto_specs/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