You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 19, 2025. It is now read-only.
I am using CodeClimate to test my gem with that contains a Rails dummy app in my spec/ directory.
Since CodeClimate version 0.4.4 my specs exit with an CodeClimate::TestReporter::InvalidPayload 'A git commit timestamp was not found in the test report payload' error.
Stacktrace
fatal: Not a git repository: 'dir/wine_bouncer/spec/dummy/.git'
Code Climate encountered an exception: CodeClimate::TestReporter::InvalidPayload
A git commit timestamp was not found in the test report payload
rvmgemdir/codeclimate-test-reporter-0.4.4/lib/code_climate/test_reporter/payload_validator.rb:16:in `validate'
rvmgemdir/codeclimate-test-reporter-0.4.4/lib/code_climate/test_reporter/payload_validator.rb:11:in `validate'
rvmgemdir/codeclimate-test-reporter-0.4.4/lib/code_climate/test_reporter/formatter.rb:21:in `format'
rvmgemdir/simplecov-0.9.1/lib/simplecov/result.rb:46:in `format!'
rvmgemdir/simplecov-0.9.1/lib/simplecov/configuration.rb:158:in `block in at_exit'
rvmgemdir/simplecov-0.9.1/lib/simplecov/defaults.rb:54:in `call'
rvmgemdir/simplecov-0.9.1/lib/simplecov/defaults.rb:54:in `block in <top (required)>'
What is probably happening
I have a gem git repository on dir/wine_bouncer/.git and an dummy app on dir/wine_bouncer/spec/dummy/.git. I am running my specs from the gem root directory. Since my specs use a mounted dummy app for integration testing, ruby-test-preporter assumes the .git directory is inside the specs directory.
This is probably because the Rails module is defined upon exiting. And is probably introduced by the #63 PR on the git_dir method.
This issue both occurs on Travis-ci and console when having a Rails dummy app mounted in your gem.