define([
  'app',
  'entities/repository',
  'modules/repository/module'
], function (app, Entities) {
  describe('repository', function() {
    describe('repository:show:list', function() {
      var repositoriesViewRequest;

      before(function() {
        repositoriesViewRequest = app.request('repository:show:list');
      });

      it('should resolve the returned promise', function(done) {
        $.when(repositoriesViewRequest).done(function() {
          done();
        });
      });

      it('should display a list of 10 items', function(done) {
        $.when(repositoriesViewRequest).done(function() {
          expect(app.listRegion.$el.find('li').length).to.equal(10);
          done();
        });
      });
    });

    describe('repository:show:item', function() {
      var repositoryViewRequest;

      before(function() {
        repositoryViewRequest = app.request('repository:show:item', 'aduth', 'marionette-require-starter');
      });

      it('should resolve the returned promise', function(done) {
        $.when(repositoryViewRequest).done(function() {
          done();
        });
      });

      it('should display the correct heading text', function(done) {
        $.when(repositoryViewRequest).done(function() {
          expect(app.contentRegion.$el.find('h1').text()).to.equal('marionette-require-starter');
          done();
        });
      });
    });

    describe('repository:entity', function() {
      var repositoryRequest;

      before(function() {
        repositoryRequest = app.request('repository:entity', 'aduth', 'marionette-require-starter');
      });

      it('should resolve the returned promise', function(done) {
        $.when(repositoryRequest).done(function(repository) {
          done();
        });
      });

      it('should be a Repository model', function(done) {
        $.when(repositoryRequest).always(function(repository) {
          expect(repository).to.be.an.instanceof(Entities.Repository);
          done();
        });
      });

      it('should contain the specified property values', function(done) {
        $.when(repositoryRequest).done(function(repository) {
          expect(repository.get('owner').login).to.equal('aduth');
          expect(repository.get('name')).to.equal('marionette-require-starter');
          done();
        });
      });
    });

    describe('repository:entities', function() {
      var repositoriesRequest;

      before(function() {
        repositoriesRequest = app.request('repository:entities');
      });

      it('should resolve the returned promise', function(done) {
        $.when(repositoriesRequest).done(function(repositories) {
          done();
        });
      });

      it('should be a Repositories collection', function(done) {
        $.when(repositoriesRequest).always(function(repositories) {
          expect(repositories).to.be.an.instanceof(Entities.Repositories);
          done();
        });
      });

      it('should consist of 10 models', function(done) {
        $.when(repositoriesRequest).always(function(repositories) {
          expect(repositories.length).to.equal(10);
          done();
        });
      });
    });
  });
});

@@ -198,68 +198,8 @@
 var 
-repositoriesViewRequest;%0A%0A      before(function() %7B%0A        
 repo
@@ -256,26 +256,16 @@
 :list');
-%0A      %7D);
 %0A%0A      
@@ -725,66 +725,8 @@
 var 
-repositoryViewRequest;%0A%0A      before(function() %7B%0A        
 repo
@@ -816,34 +816,24 @@
 e-starter');
-%0A      %7D);
 %0A%0A      it('
@@ -1317,62 +1317,8 @@
 var 
-repositoryRequest;%0A%0A      before(function() %7B%0A        
 repo
@@ -1405,26 +1405,16 @@
 arter');
-%0A      %7D);
 %0A%0A      
@@ -2205,64 +2205,8 @@
 var 
-repositoriesRequest;%0A%0A      before(function() %7B%0A        
 repo
@@ -2258,26 +2258,16 @@
 ities');
-%0A      %7D);
 %0A%0A      

Use single request deferred in testing reqres handlers