mirror of
https://github.com/danog/gift.git
synced 2024-11-26 20:04:47 +01:00
Fix default identity of repo tests
This commit is contained in:
parent
e340da9bbd
commit
aba4c6ce6e
2
test/mocha.opts
Normal file
2
test/mocha.opts
Normal file
@ -0,0 +1,2 @@
|
||||
-R spec
|
||||
--compilers coffee:coffee-script
|
@ -143,22 +143,24 @@ describe "Repo", ->
|
||||
# given a fresh new repo
|
||||
before (done) ->
|
||||
rimraf git_dir, (err) ->
|
||||
return done err if err
|
||||
return done err if err?
|
||||
fs.mkdir git_dir, '0755', (err) ->
|
||||
return done err if err
|
||||
return done err if err?
|
||||
git.init git_dir, (err) ->
|
||||
return done err if err
|
||||
return done err if err?
|
||||
repo = git(git_dir)
|
||||
fs.writeFileSync "#{git_dir}/foo.txt", "cheese"
|
||||
repo.add "#{git_dir}/foo.txt", (err) ->
|
||||
return done err if err
|
||||
repo.commit 'message with spaces',
|
||||
author: 'Someone <someone@somewhere.com>'
|
||||
, (err) ->
|
||||
return done err if err
|
||||
repo.commits (err, _commits) ->
|
||||
commit = _commits[0]
|
||||
done err
|
||||
repo.identify new Actor('root', 'root@domain.net'), (err) ->
|
||||
return done err if err?
|
||||
repo.add "#{git_dir}/foo.txt", (err) ->
|
||||
return done err if err?
|
||||
repo.commit 'message with spaces',
|
||||
author: 'Someone <someone@somewhere.com>'
|
||||
, (err) ->
|
||||
return done err if err?
|
||||
repo.commits (err, _commits) ->
|
||||
commit = _commits[0]
|
||||
done err
|
||||
|
||||
after (done) ->
|
||||
rimraf git_dir, done
|
||||
|
Loading…
Reference in New Issue
Block a user