Skip to content

Commit

Permalink
using beforeEach for watcher tests in the hopes that it will fix erra…
Browse files Browse the repository at this point in the history
…dic test
  • Loading branch information
thlorenz committed Sep 16, 2012
1 parent 88aeba0 commit acebc50
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/watcher.js
Expand Up @@ -68,7 +68,7 @@ describe('when i create a watcher with template and partial files', function ()
changedFileContent = null;
}

before(function () {
beforeEach(function () {
watchedFiles = [];

fsStub.watch = function (file, opts, cb) {
Expand Down Expand Up @@ -125,7 +125,7 @@ describe('when i create a watcher with template and partial files', function ()

describe('when plateuno changed', function () {

before(function () {
beforeEach(function () {
reset();
fileChanged[plateunoFullPath]('change');
})
Expand All @@ -143,7 +143,7 @@ describe('when i create a watcher with template and partial files', function ()

describe('when platedos changed', function () {

before(function () {
beforeEach(function () {
reset();
fileChanged[platedosFullPath]('change');
})
Expand All @@ -161,7 +161,7 @@ describe('when i create a watcher with template and partial files', function ()

describe('when partialuno changed', function () {

before(function () {
beforeEach(function () {
reset();
fileChanged[partialunoFullPath]('change');
})
Expand All @@ -179,7 +179,7 @@ describe('when i create a watcher with template and partial files', function ()

describe('when partialdos changed', function () {

before(function () {
beforeEach(function () {
reset();
fileChanged[partialdosFullPath]('change');
})
Expand All @@ -205,7 +205,7 @@ describe('when i create a watcher with template directories', function () {
, sut
;

before(function () {
beforeEach(function () {
fsStub.watch = function (directory, opts, cb) {
changeIn[directory] = cb;
watchedDirectories.push(directory);
Expand All @@ -222,7 +222,7 @@ describe('when i create a watcher with template directories', function () {
describe('when fs.watch says a directory was "renamed" e.g., when a file was added', function () {

var changedDirectories;
before(function () {
beforeEach(function () {
changedDirectories = [];
sut.on('directoryChanged', function (directory) {
changedDirectories.push(directory);
Expand Down

0 comments on commit acebc50

Please sign in to comment.