@@ -10,7 +10,7 @@ var ConfigGenerator = require('../../../lib/config/generator');
1010var crockfordClone = require ( '../../data/configs/generator/crockfordClone' ) ;
1111
1212// Skip it, to slow at the moment
13- describe . skip ( 'lib/config/generator' , function ( ) {
13+ describe ( 'lib/config/generator' , function ( ) {
1414 this . timeout ( 60000 ) ;
1515
1616 var _path = path . resolve ( __dirname , '../../../lib/config/generator.js' ) ;
@@ -166,29 +166,4 @@ describe.skip('lib/config/generator', function() {
166166 done ( ) ;
167167 } ) ;
168168 } ) ;
169-
170- it ( 'generates a .jscsrc file with the user\'s violation choices' , function ( ) {
171- stubConsole ( ) ;
172- var presetChoiceStub = sinon . stub ( generator , '_getUserPresetChoice' ) . returns ( crockfordPresetChoice ) ;
173- var getViolationsStub = sinon . stub ( generator , '_getUserViolationChoices' )
174- . returns ( Vow . cast ( crockfordViolationsAllExceptions ) ) ;
175- var fsStub = sinon . stub ( fs , 'writeFileSync' ) ;
176-
177- var assertConfigEquality = function ( c1 , c2 ) {
178- for ( var prop in c1 ) {
179- expect ( c1 [ prop ] ) . to . equal ( c2 [ prop ] ) ;
180- }
181- } ;
182-
183- return generator . generate ( _path ) . then ( function ( ) {
184- var configPath = fsStub . getCall ( 0 ) . args [ 0 ] ;
185- var config = JSON . parse ( fsStub . getCall ( 0 ) . args [ 1 ] ) ;
186- expect ( configPath ) . to . equal ( process . cwd ( ) + '/.jscsrc' ) ;
187- assertConfigEquality ( expectedConfig , config ) ;
188- presetChoiceStub . restore ( ) ;
189- getViolationsStub . restore ( ) ;
190- fsStub . restore ( ) ;
191- unstubConsole ( ) ;
192- } ) ;
193- } ) ;
194169} ) ;
0 commit comments