<commit_before>/*jshint expr:true */
define(['Squire'], function(Squire) {
  describe('Squire', function() {
    describe('constructor', function() {
      it('should create an instance of Squire', function() {
        var squireInstance = new Squire();
        squireInstance.should.be.an.instanceof(Squire);
      });

      it('should throw an error if a context doesn\'t exist', function() {
        var create = function() {
          new Squire('not-real');
        };
        create.should.Throw();
      });
    });
    
    describe('run', function() {
      var instance = new Squire();
      it('should execute this test using run', instance.run(['mocks/Shirt'], function(Shirt) {
        Shirt.color.should.equal('Red');
      }));
    });

    describe('require', function() {
      
      it('should require my specified dependencies', function(done) {
        var squire = new Squire();
        squire.require(['mocks/Shirt'], function(Shirt) {
          Shirt.should.exist;
          done();
        });
      });

      it('should require a relative module', function(done) {
        var squire = new Squire();
        squire
          .mock(['mocks/Shirt'], {
            color: 'Blue',
            size: 'Unknown'
          })
          .require(['mocks/Formal'], function(Formal) {
            Formal.shirt.color.should.equal('Blue');
            done();
          });

        squire.remove();
      });

      it('should mock one of multiple dependencies', function(done) {
        var squire = new Squire();
        squire
          .mock(['mocks/Pant'], {
            type: 'None'
          })
          .require(['mocks/FullyDressed'], function(FullyDressed) {
            FullyDressed.shirt.color.should.equal('Red');
            FullyDressed.pant.type.should.equal('None');
            done();
          });
      });

      it('should return my mocks to me using a magic module', function(done) {
        var squire = new Squire();
        squire
          .mock('mocks/Shirt', {
            color: 'Cyan'
          })<commit_msg>Mock path should be a string or object literal.<commit_after>/*jshint expr:true */
define(['Squire'], function(Squire) {
  describe('Squire', function() {
    describe('constructor', function() {
      it('should create an instance of Squire', function() {
        var squireInstance = new Squire();
        squireInstance.should.be.an.instanceof(Squire);
      });

      it('should throw an error if a context doesn\'t exist', function() {
        var create = function() {
          new Squire('not-real');
        };
        create.should.Throw();
      });
    });
    
    describe('run', function() {
      var instance = new Squire();
      it('should execute this test using run', instance.run(['mocks/Shirt'], function(Shirt) {
        Shirt.color.should.equal('Red');
      }));
    });

    describe('require', function() {
      
      it('should require my specified dependencies', function(done) {
        var squire = new Squire();
        squire.require(['mocks/Shirt'], function(Shirt) {
          Shirt.should.exist;
          done();
        });
      });

      it('should require a relative module', function(done) {
        var squire = new Squire();
        squire
          .mock('mocks/Shirt', {
            color: 'Blue',
            size: 'Unknown'
          })
          .require(['mocks/Formal'], function(Formal) {
            Formal.shirt.color.should.equal('Blue');
            done();
          });

        squire.remove();
      });

      it('should mock one of multiple dependencies', function(done) {
        var squire = new Squire();
        squire
          .mock('mocks/Pant', {
            type: 'None'
          })
          .require(['mocks/FullyDressed'], function(FullyDressed) {
            FullyDressed.shirt.color.should.equal('Red');
            FullyDressed.pant.type.should.equal('None');
            done();
          });
      });

      it('should return my mocks to me using a magic module', function(done) {
        var squire = new Squire();
        squire
          .mock('mocks/Shirt', {
            color: 'Cyan'
          })
{'fraction_non_alphanumeric': 0.15074770863482875, 'fraction_numerical': 0.0, 'mean_word_length': 1.9411347517730497, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6057631', 'n_tokens_mistral': 1163, 'n_tokens_neox': 1152, 'n_words': 262}