// Load modules

var Chai = require('chai');
var Hapi = require('../../helpers');


// Declare internals

var internals = {};


// Test shortcuts

var expect = Chai.expect;


describe('Response', function () {

    describe('View', function () {

        describe('#_generateListing', function () {

            it('returns an error when reading an invalid directory', function (done) {

                var fn = (function () {
                    Hapi.response.View.Views.init({
                        path: __dirname + '/../views/handlebars'
                    })
                    var view = new Hapi.response.View('valid/test', {});
                    
                    expect(view._payload).to.exist;
                    expect(view._payload.length).above(1);
                });
                
                expect(fn).to.not.throw();
                done();
            });
        });
    });
});
@@ -252,119 +252,41 @@
     
-describe('#_generateListing', function () %7B%0A%0A            it('returns an error
+it('should not throw
  when 
+c
 rea
-ding an invalid directory
+ted
 ', f
@@ -299,28 +299,24 @@
 n (done) %7B%0A%0A
-    
             
@@ -355,20 +355,16 @@
         
-    
 Hapi.res
@@ -407,20 +407,16 @@
         
-    
 path: __
@@ -450,13 +450,16 @@
 bars
-'%0A   
+/valid'%0A
     
@@ -474,16 +474,11 @@
     
- 
 %7D)%0A
-    
     
@@ -528,14 +528,8 @@
 ew('
-valid/
 test
@@ -548,33 +548,25 @@
             
-    %0A    
+%0A
             
@@ -609,36 +609,32 @@
                 
-    
 expect(view._pay
@@ -660,36 +660,32 @@
 1);%0A            
-    
 %7D);%0A            
@@ -676,39 +676,33 @@
 %7D);%0A            
-    %0A  
+%0A
               ex
@@ -693,26 +693,24 @@
             
-  
 expect(fn).t
@@ -740,20 +740,16 @@
     
-    
 done();%0A
     
@@ -744,32 +744,16 @@
 done();%0A
-            %7D);%0A
         

update desc