From 0d4110ff6f91f2886365bf7a5126aeef9c42ba58 Mon Sep 17 00:00:00 2001 From: Kieran Sedgwick Date: Fri, 14 Nov 2014 12:04:51 -0500 Subject: [PATCH] Fixed #323 - Updated references to "fs.Shell" in the docs and test suite --- README.md | 16 ++++++++-------- tests/spec/fs.shell.spec.js | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 674ca33..1e21803 100644 --- a/README.md +++ b/README.md @@ -1093,20 +1093,20 @@ and provides augmented features. Many separate `FileSystemShell` objects can exi `FileSystem`, but each `FileSystemShell` is bound to a single instance of a `FileSystem` for its lifetime. -A `FileSystemShell` is created by calling `Filer.FileSystem().shell()`: +A `FileSystemShell` is created by instantiating `Filer.FileSystem().Shell`: ```javascript var fs = new Filer.FileSystem(); -var sh = fs.shell(options); -var sh2 = fs.shell(options); +var sh = new fs.Shell(options); +var sh2 = new fs.Shell(options); // sh and sh2 are two separate shells, each bound to fs ``` -Or, the original object can be accessed through `Filer`: +In addition, the constructor function can be accessed through `Filer`: ```javascript var fs = new Filer.FileSystem(); -var sh = fs.shell(); +var sh = new fs.Shell(); Filer.Shell.prototype.newFunction = ...; @@ -1120,7 +1120,7 @@ others may be added in the future. You can also add your own, or update existing ```javascript var fs = new Filer.FileSystem(); -var sh = fs.shell({ +var sh = new fs.Shell({ env: { TMP: '/tempdir', PATH: '/one:/two' @@ -1146,7 +1146,7 @@ Example: ```javascript var fs = new Filer.FileSystem(); -var sh = fs.shell(); +var sh = new fs.Shell(); var p = sh.env.get('PATH'); // Store the current location @@ -1166,7 +1166,7 @@ examples below assume a `FileSystemShell` instance named `sh` has been created l ```javascript var fs = new Filer.FileSystem(); -var sh = fs.shell(); +var sh = new fs.Shell(); ``` * [sh.cd(path, callback)](#cd) diff --git a/tests/spec/fs.shell.spec.js b/tests/spec/fs.shell.spec.js index 164e5ee..d377dee 100644 --- a/tests/spec/fs.shell.spec.js +++ b/tests/spec/fs.shell.spec.js @@ -2,7 +2,7 @@ var Filer = require('../..'); var util = require('../lib/test-utils.js'); var expect = require('chai').expect; -describe("fs.shell", function() { +describe("fs.Shell", function() { beforeEach(util.setup); afterEach(util.cleanup);