Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-push hook for running test-unit #397

Closed
wants to merge 3 commits into from

Conversation

@morizyun
Copy link
Contributor

@morizyun morizyun commented Jul 9, 2016

This hook is to run test-unit like a RSpec or minitest before pushing remote repository.

I am not good at English, but I will always do my best.
If you have any question or advice, please don't hesitate to tell me. 馃嵒

TestUnit:
enabled: false
description: 'Run test-unit'
command: ['rake', 'test']

This comment has been minimized.

@lencioni

lencioni Jul 9, 2016
Collaborator

I'm not very familiar with rake test, but couldn't it be configured to run anything and not just test-unit? If that is the case, and probably even if it isn't, this hook should be called RakeTest instead since that is what it will be running.

This comment has been minimized.

@jawshooah

jawshooah Jul 9, 2016
Collaborator

Alternatively, we could follow the example of Minitest and do this:

TestUnit:
  enabled: false
  description: 'Run Test::Unit test suite'
  command: ['ruby', '-Ilib:test', '-rtest/unit', "-e 'exit! Test::Unit::AutoRunner.run'"]

This comment has been minimized.

@morizyun

morizyun Jul 9, 2016
Author Contributor

Thank you very much for your kind advise. You are right. I fixed default.yml which you taught.

@lencioni
Copy link
Collaborator

@lencioni lencioni commented Jul 9, 2016

A link to this should be added to the readme so that people will know that it exists.

@morizyun
Copy link
Contributor Author

@morizyun morizyun commented Jul 9, 2016

Thanks, I added the link to README 馃槃

@jawshooah

This comment has been minimized.

Copy link
Collaborator

@jawshooah jawshooah commented on config/default.yml in 88f65ed Jul 10, 2016

No need for this in a PrePush hook.

@sds sds added the enhancement label Jul 12, 2016
@sds
Copy link
Owner

@sds sds commented Jul 12, 2016

Merged in fb9b2f5. Thanks!

@sds sds closed this Jul 12, 2016
@morizyun morizyun deleted the morizyun:feature/add_unit_test_push_hook branch Jul 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants