Add specs for Git.isIgnored

This commit is contained in:
Kevin Sawicki
2012-10-26 16:24:47 -07:00
committed by Corey Johnson
parent a9baf54707
commit f5db2b63d8
14 changed files with 23 additions and 1 deletions

View File

@@ -28,3 +28,12 @@ describe "Git", ->
it "returns a branch name for a non-empty repository", ->
repo = new Git(require.resolve('fixtures/git/master.git'))
expect(repo.getShortHead()).toBe 'master'
describe "isIgnored()", ->
it "returns true for an ignored path", ->
repo = new Git(require.resolve('fixtures/git/ignore.git'))
expect(repo.isIgnored('a.txt')).toBeTruthy()
it "returns false for a non-ignored path", ->
repo = new Git(require.resolve('fixtures/git/ignore.git'))
expect(repo.isIgnored('b.txt')).toBeFalsy()