Skip to content

Commit 2e459c2

Browse files
Setting up git user name and email before tests (if they are not present)
1 parent 7045d8a commit 2e459c2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Rakefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ end
1212

1313
desc "Run Unit Tests"
1414
task :test do |t|
15-
$VERBOSE = true
16-
require File.dirname(__FILE__) + '/tests/all_tests.rb'
15+
sh 'git config --global user.email "git@example.com"' if `git config user.email`.empty?
16+
sh 'git config --global user.name "GitExample"' if `git config user.name`.empty?
17+
18+
$VERBOSE = true
19+
require File.dirname(__FILE__) + '/tests/all_tests.rb'
1720
end
1821

1922
Rake::RDocTask.new do |rdoc|

0 commit comments

Comments
 (0)