From ed3f70805ac0e30bf14f6a5850e873329f5e337c Mon Sep 17 00:00:00 2001 From: Oscar Lim Date: Mon, 29 Aug 2016 11:54:59 -0700 Subject: [PATCH] Fix failing tests after penlight upgrade This fixes failing unit tests after upgrading `penlight`. Apparently, the new version of `penlight` uses `pl.List` internally when traversing a directory. Hence, we cannot use `pl.List` in any of the insulation tests. Alpine notes: This patch is backported from upstream. --- spec/insulate-expose_spec.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/spec/insulate-expose_spec.lua b/spec/insulate-expose_spec.lua index 0409a3d..bba84bd 100644 --- a/spec/insulate-expose_spec.lua +++ b/spec/insulate-expose_spec.lua @@ -13,9 +13,9 @@ describe('Tests insulation', function() it('updates package.loaded', function() assert.is_not_nil(pl) - assert.is_not_nil(List) + assert.is_not_nil(Date) assert.is_not_nil(package.loaded.pl) - assert.is_not_nil(package.loaded['pl.List']) + assert.is_not_nil(package.loaded['pl.Date']) end) end) @@ -27,9 +27,9 @@ describe('Tests insulation', function() it('restores package.loaded', function() assert.is_nil(pl) - assert.is_nil(List) + assert.is_nil(Date) assert.is_nil(package.loaded.pl) - assert.is_nil(package.loaded['pl.List']) + assert.is_nil(package.loaded['pl.Date']) end) end) end) @@ -54,9 +54,9 @@ insulate('', function() it('updates package.loaded', function() assert.is_not_nil(pl) - assert.is_not_nil(List) + assert.is_not_nil(Date) assert.is_not_nil(package.loaded.pl) - assert.is_not_nil(package.loaded['pl.List']) + assert.is_not_nil(package.loaded['pl.Date']) end) end) end) @@ -74,9 +74,9 @@ insulate('', function() it('does not restore package.loaded', function() assert.is_not_nil(pl) - assert.is_not_nil(List) + assert.is_not_nil(Date) assert.is_not_nil(package.loaded.pl) - assert.is_not_nil(package.loaded['pl.List']) + assert.is_not_nil(package.loaded['pl.Date']) end) end) end) @@ -93,9 +93,9 @@ insulate('', function() end) it('Tests package.loaded persists without insulate', function() - assert.is_not_nil(List) + assert.is_not_nil(Date) assert.is_not_nil(package.loaded.pl) - assert.is_not_nil(package.loaded['pl.List']) + assert.is_not_nil(package.loaded['pl.Date']) end) end) @@ -107,9 +107,9 @@ describe('Tests after insulating an expose block', function() it('restores package.loaded', function() assert.is_nil(pl) - assert.is_nil(List) + assert.is_nil(Date) assert.is_nil(package.loaded.pl) - assert.is_nil(package.loaded['pl.List']) + assert.is_nil(package.loaded['pl.Date']) end) end)