<commit_before>define ['main', 'utils'], (JasmineSugar, _) ->

  describe 'JasmineSugar', ->
    context     =
    Jasmine     =
    JasmineMock = undefined

    beforeEach ->
      JasmineMock = jasmine.createSpyObj 'JasmineMock', ['it', 'fit', 'another']

    it 'should be defined', ->
      expect(JasmineSugar).toBeDefined()

    it 'should respond to setup', ->
      expect(JasmineSugar.setup).toBeDefined()

    describe '#setup', ->

      describe 'jasmine with getEnv() present on origin context', ->
        beforeEach ->
          Jasmine =
            getEnv: -> JasmineMock

          context =
            jasmine: Jasmine

        describe 'should properly extend context', ->
          beforeEach ->
            expect(_(context).keys()).toEqual ['jasmine']
            JasmineSugar.setup(context)

          it 'new context has new properties', ->
            expect(_(context).keys()).toEqual [
              'jasmine',
              'set',
              'it',
              'fit'
            ]

          it '#it is defined and is a function', ->
            expect(context.it).toBeDefined()
            expect(context.it).toBeAFunction()

          it '#fit is defined and is a function', ->
            expect(context.fit).toBeDefined()
            expect(context.fit).toBeAFunction()

          it '#set is defined and is a function', ->
            expect(context.set).toBeDefined()
            expect(context.set).toBeAFunction()

      describe 'jasmine without getEnv() present on origin context', ->
        beforeEach ->
          Jasmine = {}

          context =
            jasmine: Jasmine

        it 'should not extend context', ->
          expect(_(context).keys()).toEqual ['jasmine']
          JasmineSugar.setup(context)
          expect(_(context).keys()).toEqual ['jasmine']

      describe 'empty context', ->
        beforeEach ->
          context = {}

        it 'should not extend context', ->
          expect(_(context).keys()).toEqual []
          JasmineSugar.setup(context)
          expect(_(context).keys()).toEqual []

    describe 'new context', ->

      beforeEach ->
        Jasmine =
          getEnv: -> JasmineMock
<commit_msg>remove Utils usage from mainSpec.coffee<commit_after>define ['main'], (JasmineSugar) ->

  describe 'JasmineSugar', ->
    context     =
    Jasmine     =
    JasmineMock = undefined

    beforeEach ->
      JasmineMock = jasmine.createSpyObj 'JasmineMock', ['it', 'fit', 'another']

    it 'should be defined', ->
      expect(JasmineSugar).toBeDefined()

    it 'should respond to setup', ->
      expect(JasmineSugar.setup).toBeDefined()

    describe '#setup', ->

      describe 'jasmine with getEnv() present on origin context', ->
        beforeEach ->
          Jasmine =
            getEnv: -> JasmineMock

          context =
            jasmine: Jasmine

        describe 'should properly extend context', ->
          beforeEach ->
            expect(context).toHaveProperties ['jasmine']
            JasmineSugar.setup(context)

          it 'new context has new properties', ->
            expect(context).toHaveProperties [
              'jasmine',
              'set',
              'it',
              'fit'
            ]

          it '#it is defined and is a function', ->
            expect(context.it).toBeDefined()
            expect(context.it).toBeAFunction()

          it '#fit is defined and is a function', ->
            expect(context.fit).toBeDefined()
            expect(context.fit).toBeAFunction()

          it '#set is defined and is a function', ->
            expect(context.set).toBeDefined()
            expect(context.set).toBeAFunction()

      describe 'jasmine without getEnv() present on origin context', ->
        beforeEach ->
          Jasmine = {}

          context =
            jasmine: Jasmine

        it 'should not extend context', ->
          expect(context).toHaveProperties ['jasmine']
          JasmineSugar.setup(context)
          expect(context).toHaveProperties ['jasmine']

      describe 'empty context', ->
        beforeEach ->
          context = {}

        it 'should not extend context', ->
          expect(context).not.toHaveProperties()
          JasmineSugar.setup(context)
          expect(context).not.toHaveProperties()

    describe 'new context', ->

      beforeEach ->
        Jasmine =
          getEnv: -> JasmineMock

{'fraction_non_alphanumeric': 0.12033666969972702, 'fraction_numerical': 0.0, 'mean_word_length': 1.8404392764857882, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 51, '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': '769945', 'n_tokens_mistral': 1212, 'n_tokens_neox': 1122, 'n_words': 279}