From 0d5afa8d718e8052aaec08b1b6baaec0800ed635 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Wed, 10 Nov 2010 20:48:35 -0500 Subject: [PATCH] Moved object extend() assertion to its own file to prepare for extending subtypes --- test/test-class-extend.js | 35 +++++++++++++++++++++++++++++++++++ test/test-class.js | 5 ----- 2 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 test/test-class-extend.js diff --git a/test/test-class-extend.js b/test/test-class-extend.js new file mode 100644 index 0000000..3ac9e51 --- /dev/null +++ b/test/test-class-extend.js @@ -0,0 +1,35 @@ +/** + * Tests class module extend() method + * + * Copyright (C) 2010 Mike Gerwitz + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * @author Mike Gerwitz + * @package test + */ + +require( './common' ); + +var assert = require( 'assert' ), + Class = require( 'class' ); + +var Foo = Class.extend(); + + +assert.ok( + ( Foo.prototype.extend instanceof Function ), + "Created class contains extend method in prototype" +); + diff --git a/test/test-class.js b/test/test-class.js index 011af67..e81e418 100644 --- a/test/test-class.js +++ b/test/test-class.js @@ -40,8 +40,3 @@ assert.ok( "Extend method creates a new object" ); -assert.ok( - ( Foo.prototype.extend instanceof Function ), - "Created class contains extend method in prototype" -); -