<commit_before>import Ember from 'ember';
import hasEmberVersion from 'ember-test-helpers/has-ember-version';
import { initialize } from 'ember-toastr/initializers/toastr';
import { module, test } from 'qunit';

var registry, application;

module('Unit | Initializer | toastr', {
  beforeEach: function() {
    Ember.run(function() {
      application = Ember.Application.create();

      if (hasEmberVersion(1) || hasEmberVersion(2, 0)) {
        registry = application.registry;
      } else {
        registry = application.container;
      }

      application.deferReadiness();
    });
  }
});

// Replace this with your real tests.
test('it works', function(assert) {
  initialize(application, {
    injectAs: 'test'
  });

  // you would normally confirm the results of the initializer here
  var toastr = registry.lookup('notify:main');
  assert.ok(typeof toastr.info === 'function');
});<commit_msg>Really fix tests<commit_after>import Ember from 'ember';
import { initialize } from 'ember-toastr/initializers/toastr';
import { module, test } from 'qunit';

var registry, application;
var numbers = Ember.VERSION.split('-')[0].split('.');
var major = Number(numbers[0]);
var minor = Number(numbers[1]);

module('Unit | Initializer | toastr', {
  beforeEach: function() {
    Ember.run(function() {
      application = Ember.Application.create();

      if (major === 1 || (major === 2 && minor < 1)) {
        registry = application.registry;
      } else {
        registry = application.__container__;
      }

      application.deferReadiness();
    });
  }
});

// Replace this with your real tests.
test('it works', function(assert) {
  initialize(application, {
    injectAs: 'test'
  });

  // you would normally confirm the results of the initializer here
  var toastr = registry.lookup('notify:main');
  assert.ok(typeof toastr.info === 'function');
});
{'fraction_non_alphanumeric': 0.14698022447888828, 'fraction_numerical': 0.004810261892036344, 'mean_word_length': 3.633663366336634, 'pattern_counts': {'":': 0, '<': 4, '<?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': '7234615', 'n_tokens_mistral': 554, 'n_tokens_neox': 544, 'n_words': 142}