Permalink
Browse files

More specs for Package.update()

  • Loading branch information...
1 parent d9d8941 commit ee88a40b129d943dffd4a4165ee5c672825e28df @vtsvang committed Jan 21, 2013
Showing with 12 additions and 0 deletions.
  1. +12 −0 test/specs/programmatic/package.coffee
@@ -91,6 +91,18 @@ describe "Package", ->
done()
+ it "should fetch all the versions of listed dependencies", ( done ) ->
+ fetch = sinon.spy @successful, "fetch"
+
+ @successful.load ( err ) ->
+ list = [ "coffee-script", "commander", "mocha" ]
+
+ @update list, ( err ) ->
+ for own dep in list
+ fetch.calledWith( dep ).should.be.true
+
+ done()
+
it "should invoke callback", ( done ) ->
@successful.load ( err ) ->
@update "mocha", done

0 comments on commit ee88a40

Please sign in to comment.