Creates a git commit after each TDD step. Uses the new specification name to build the commit message. Built to the Ruby based RSpec.
$ gem install rspec-git
Extend the spec file with the requirement:
describe "User" do
it "should have name" do
User.new.should respond_to(:name)
end
end
After implementing the feature and all of your specs are green, just call the rspec-git
command in your project's root directory:
$ rspec-git
It added the new changes to stage and created a git commit with the following message:
Added user should have name
If you remove the spec, the generated message will be the following:
Removed user should have name
Let me know if you have any issue!
- Fork it
- 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 new Pull Request