From 4d24ab2c360d19dd542b5f06b9fa589aa9fd6cb6 Mon Sep 17 00:00:00 2001 From: yoavgurevich Date: Fri, 16 May 2014 11:43:54 -0400 Subject: [PATCH] Fixed logic, format, and dependencies according to line note comments from last pull request. Tested on apache localhost server. --- .gitignore | 1 - src/constants.js | 4 ++-- tests/spec/fs.open.spec.js | 9 ++------- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 45e7df2..c794f4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ node_modules bower_components *~ -/logicnotes.js diff --git a/src/constants.js b/src/constants.js index 6c6a59e..bad5944 100644 --- a/src/constants.js +++ b/src/constants.js @@ -68,7 +68,7 @@ define(function(require) { SUPER_NODE_ID: '00000000-0000-0000-0000-000000000000', - //Reserved FileDescriptors for streams + // Reserved File Descriptors for streams STDIN: 0, STDOUT: 1, STDERR: 2, @@ -80,4 +80,4 @@ define(function(require) { } }; -}); \ No newline at end of file +}); diff --git a/tests/spec/fs.open.spec.js b/tests/spec/fs.open.spec.js index a0cfcb3..3b8b0ec 100644 --- a/tests/spec/fs.open.spec.js +++ b/tests/spec/fs.open.spec.js @@ -77,19 +77,14 @@ define(["Filer", "util"], function(Filer, util) { it('should return the argument value of the file descriptor index matching the value set by the first useable file descriptor constant', function(done) { var fs = util.fs(); - var openFileDescription = require('src/open-file-description'); - fs.firstFD = require('src/constants').FIRST_DESCRIPTOR; + var firstFD = require('src/constants').FIRST_DESCRIPTOR; var fd1; fs.open('/file1', 'w+', function(error, fd) { if(error) throw error; expect(error).not.to.exist; expect(fd).to.be.a('number'); - expect(fd).not.to.equal(fd1); - - this.allocDescriptor = function(openFileDescription) { - expect(fd).to.equal(fs.firstFD); - }; + expect(fd).to.equal(firstFD); done(); }); });