From b5e72b2934ceb8b330c0f4f0e4d417206f2c2aca Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Tue, 7 Jan 2014 04:06:41 -0500 Subject: [PATCH] Moved test-class_builder-const into suite as ClassBuilder/ConstTest --- .../ConstTest.js} | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) rename test/{test-class_builder-const.js => ClassBuilder/ConstTest.js} (84%) diff --git a/test/test-class_builder-const.js b/test/ClassBuilder/ConstTest.js similarity index 84% rename from test/test-class_builder-const.js rename to test/ClassBuilder/ConstTest.js index 290c3c1..acf7cbe 100644 --- a/test/test-class_builder-const.js +++ b/test/ClassBuilder/ConstTest.js @@ -19,27 +19,30 @@ * along with this program. If not, see . */ -var common = require( './common' ), - - // XXX: get rid of this disgusting mess; we're mid-refactor and all these - // dependencies should not be necessary for testing - ClassBuilder = common.require( '/ClassBuilder' ), - MethodWrapperFactory = common.require( '/MethodWrapperFactory' ), - wrappers = common.require( '/MethodWrappers' ).standard -; - require( 'common' ).testCase( { + caseSetUp: function() + { + // XXX: get rid of this disgusting mess; we're mid-refactor and all + // these dependencies should not be necessary for testing + this.Sut = this.require( 'ClassBuilder' ); + this.MethodWrapperFactory = this.require( 'MethodWrapperFactory' ); + + this.wrappers = this.require( 'MethodWrappers' ).standard; + }, + + setUp: function() { - this.builder = ClassBuilder( + this.builder = this.Sut( this.require( '/MemberBuilder' )( - MethodWrapperFactory( wrappers.wrapNew ), - MethodWrapperFactory( wrappers.wrapOverride ), - MethodWrapperFactory( wrappers.wrapProxy ), + this.MethodWrapperFactory( this.wrappers.wrapNew ), + this.MethodWrapperFactory( this.wrappers.wrapOverride ), + this.MethodWrapperFactory( this.wrappers.wrapProxy ), this.getMock( 'MemberBuilderValidator' ) ), - this.require( '/VisibilityObjectFactoryFactory' ).fromEnvironment() + this.require( '/VisibilityObjectFactoryFactory' ) + .fromEnvironment() ) },