mirror of
https://github.com/danog/gift.git
synced 2024-11-30 04:19:37 +01:00
Fix deprecated should calls
This commit is contained in:
parent
78948e2553
commit
4a7aa57a6b
@ -27,7 +27,7 @@ describe "Blob", ->
|
||||
|
||||
it "is a string", ->
|
||||
data.should.be.type "string"
|
||||
data.should.include "Bla"
|
||||
data.should.containEql "Bla"
|
||||
|
||||
describe "of a file in a subdir", ->
|
||||
repo = git "#{__dirname}/fixtures/branched"
|
||||
@ -41,7 +41,7 @@ describe "Blob", ->
|
||||
|
||||
it "is a string", ->
|
||||
data.should.be.type "string"
|
||||
data.should.include "!!!"
|
||||
data.should.containEql "!!!"
|
||||
|
||||
describe "#dataStream", ->
|
||||
describe "of a file off the root", ->
|
||||
@ -57,7 +57,7 @@ describe "Blob", ->
|
||||
|
||||
it "is a string", ->
|
||||
data.should.be.type "string"
|
||||
data.should.include "Bla"
|
||||
data.should.containEql "Bla"
|
||||
|
||||
describe "of a file in a subdir", ->
|
||||
repo = git "#{__dirname}/fixtures/branched"
|
||||
@ -73,6 +73,6 @@ describe "Blob", ->
|
||||
|
||||
it "is a string", ->
|
||||
data.should.be.type "string"
|
||||
data.should.include "!!!"
|
||||
data.should.containEql "!!!"
|
||||
|
||||
|
||||
|
@ -15,15 +15,15 @@ describe "Ref", ->
|
||||
Ref.find_all repo, "remote", Ref, (err, _remotes) ->
|
||||
remotes = _remotes
|
||||
done err
|
||||
|
||||
|
||||
it "is an Array of Refs", ->
|
||||
remotes.should.be.an.instanceof Array
|
||||
remotes[0].should.be.an.instanceof Ref
|
||||
|
||||
|
||||
it "the first item is a remote", ->
|
||||
remotes[0].name.should.eql "origin/HEAD"
|
||||
remotes[0].commit.should.be.an.instanceof Commit
|
||||
|
||||
|
||||
it "the second item is a remote", ->
|
||||
remotes[1].name.should.eql "origin/master"
|
||||
remotes[1].commit.should.be.an.instanceof Commit
|
||||
@ -37,18 +37,18 @@ describe "Head", ->
|
||||
Head.find_all repo, (err, h) ->
|
||||
heads = h
|
||||
done err
|
||||
|
||||
|
||||
it "is an Array of Heads", ->
|
||||
heads.should.be.an.instanceof Array
|
||||
heads[0].should.be.an.instanceof Head
|
||||
|
||||
|
||||
it "contains the branches", ->
|
||||
heads.should.have.lengthOf 2
|
||||
names = _.map heads, ((b) -> b.name)
|
||||
names.should.include "master"
|
||||
names.should.include "something"
|
||||
|
||||
|
||||
names.should.containEql "master"
|
||||
names.should.containEql "something"
|
||||
|
||||
|
||||
describe ".current", ->
|
||||
repo = fixtures.branched
|
||||
branch = null
|
||||
@ -56,9 +56,9 @@ describe "Head", ->
|
||||
Head.current repo, (err, b) ->
|
||||
branch = b
|
||||
done err
|
||||
|
||||
|
||||
it "is a Head", ->
|
||||
branch.should.be.an.instanceof Head
|
||||
|
||||
|
||||
it "has the correct name", ->
|
||||
branch.name.should.eql "master"
|
||||
|
@ -224,7 +224,7 @@ describe "Repo", ->
|
||||
done err
|
||||
|
||||
it "is the latest commit on the tag", ->
|
||||
commits[0].message.should.include "commit 5"
|
||||
commits[0].message.should.containEql "commit 5"
|
||||
|
||||
describe "limit the number of commits", ->
|
||||
repo = fixtures.tagged
|
||||
@ -246,7 +246,7 @@ describe "Repo", ->
|
||||
done err
|
||||
|
||||
it "returns 2 commits", ->
|
||||
commits[0].message.should.include "commit 4"
|
||||
commits[0].message.should.containEql "commit 4"
|
||||
|
||||
describe "with or without gpg signature", ->
|
||||
repo = fixtures.gpgsigned
|
||||
@ -286,8 +286,8 @@ describe "Repo", ->
|
||||
it "checks out branch:master", (done) ->
|
||||
repo.tree().blobs (err, blobs) ->
|
||||
blobs[0].data (err, data) ->
|
||||
data.should.include "Bla"
|
||||
data.should.not.include "Bla2"
|
||||
data.should.containEql "Bla"
|
||||
data.should.not.containEql "Bla2"
|
||||
done err
|
||||
|
||||
describe "specific branch", ->
|
||||
@ -297,7 +297,7 @@ describe "Repo", ->
|
||||
it "checks out branch:something", (done) ->
|
||||
repo.tree("something").blobs (err, blobs) ->
|
||||
blobs[0].data (err, data) ->
|
||||
data.should.include "Bla2"
|
||||
data.should.containEql "Bla2"
|
||||
done err
|
||||
|
||||
|
||||
|
@ -11,19 +11,19 @@ describe "Tag", ->
|
||||
Tag.find_all repo, (err, _tags) ->
|
||||
tags = _tags
|
||||
done err
|
||||
|
||||
|
||||
it "is an Array of Tags", ->
|
||||
tags.should.be.an.instanceof Array
|
||||
tags[0].should.be.an.instanceof Tag
|
||||
|
||||
|
||||
pref = "the tag"
|
||||
it "#{pref} has the correct name", ->
|
||||
tags[0].name.should.eql "tag-1"
|
||||
|
||||
|
||||
it "#{pref} has the correct commit", ->
|
||||
tags[0].commit.id.should.eql "32bbb351de16c3e404b3b7c77601c3d124e1e1a1"
|
||||
|
||||
|
||||
|
||||
|
||||
describe "#message", ->
|
||||
repo = fixtures.tagged
|
||||
tags = null
|
||||
@ -35,10 +35,10 @@ describe "Tag", ->
|
||||
tags[0].message (err, _message) ->
|
||||
message = _message
|
||||
done err
|
||||
|
||||
|
||||
it "is the correct message", ->
|
||||
message.should.include "the first tag"
|
||||
|
||||
message.should.containEql "the first tag"
|
||||
|
||||
it "has the correct commit", ->
|
||||
tags[0].commit.message.should.eql "commit 5"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user