forked from danielmahon/gift
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:sentientwaffle/gift
* 'master' of github.com:sentientwaffle/gift: Clone using HTTPS to avoid authentication prompt Update README.md Disable Git.clone() test Git.init() extended with bare parameter Git.clone() added bump to 0.0.6 locked down the signature of Repo#sync with unit tests and an accurate representation in the README [README] #sync [README] #remote_remove and #remote_push [README] #status, #identity and #identify for Travis: make use of Repo#identify to ensure that our repository has an identity set when running the #create_tag test
- Loading branch information
Showing
6 changed files
with
182 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,57 @@ | ||
should = require 'should' | ||
git = require '../src' | ||
Repo = require '../src/repo' | ||
fs = require "fs" | ||
{exec} = require 'child_process' | ||
|
||
describe "git", -> | ||
describe "()", -> | ||
repo = git "#{__dirname}/fixtures/simple" | ||
|
||
it "returns a Repo", -> | ||
repo.should.be.an.instanceof Repo | ||
|
||
describe "init()", -> | ||
repo = null | ||
newRepositoryDir = "#{__dirname}/fixtures/new" | ||
before (done) -> | ||
fs.mkdirSync newRepositoryDir | ||
git.init newRepositoryDir, (err, _repo) -> | ||
repo = _repo | ||
done err | ||
it "inits a Repo", -> | ||
repo.should.be.an.instanceof Repo | ||
bare = repo.bare || false | ||
bare.should.be.false | ||
after (done) -> | ||
exec "rm -rf #{newRepositoryDir}", done | ||
|
||
describe "init() bare", -> | ||
repo = null | ||
newRepositoryDir = "#{__dirname}/fixtures/bare" | ||
before (done) -> | ||
fs.mkdirSync newRepositoryDir | ||
git.init newRepositoryDir, true, (err, _repo) -> | ||
repo = _repo | ||
done err | ||
it "inits a bare Repo", -> | ||
repo.should.be.an.instanceof Repo | ||
bare = repo.bare || false | ||
bare.should.be.true | ||
after (done) -> | ||
exec "rm -rf #{newRepositoryDir}", done | ||
|
||
describe "clone()", -> | ||
@timeout 30000 | ||
repo = null | ||
newRepositoryDir = "#{__dirname}/fixtures/clone" | ||
before (done) -> | ||
git.clone "https://github.com/notatestuser/gift.git", newRepositoryDir, (err, _repo) -> | ||
repo = _repo | ||
done err | ||
it "clone a repository", (done) -> | ||
repo.should.be.an.instanceof Repo | ||
repo.remote_list (err, remotes) -> | ||
remotes.should.have.length 1 | ||
done() | ||
after (done) -> | ||
exec "rm -rf #{newRepositoryDir}", done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters