<commit_before>var set = Ember.set, get = Ember.get;

var View, view, willDestroyCalled, childView;

module("Ember.View - append() and appendTo()", {
  setup: function() {
    View = Ember.View.extend({});
  },

  teardown: function() {
    Ember.run(function(){
      if (!view.isDestroyed) { view.destroy(); }
    });
  }
});

test("should be added to the specified element when calling append()", function() {
  Ember.$("#qunit-fixture").html('<div id="menu"></div>');

  view = View.create();

  ok(!get(view, 'element'), "precond - should not have an element");

  Ember.run(function() {
    view.appendTo('#menu');
  });

  var viewElem = Ember.$('#menu').children();
  ok(viewElem.length > 0, "creates and appends the view's element");
});

test("should be added to the document body when calling appendTo()", function() {
  view = View.create({
    render: function(buffer) {
      buffer.push("foo bar baz");
    }
  });

  ok(!get(view, 'element'), "precond - should not have an element");<commit_msg>fix some typos in the test names<commit_after>var set = Ember.set, get = Ember.get;

var View, view, willDestroyCalled, childView;

module("Ember.View - append() and appendTo()", {
  setup: function() {
    View = Ember.View.extend({});
  },

  teardown: function() {
    Ember.run(function(){
      if (!view.isDestroyed) { view.destroy(); }
    });
  }
});

test("should be added to the specified element when calling appendTo()", function() {
  Ember.$("#qunit-fixture").html('<div id="menu"></div>');

  view = View.create();

  ok(!get(view, 'element'), "precond - should not have an element");

  Ember.run(function() {
    view.appendTo('#menu');
  });

  var viewElem = Ember.$('#menu').children();
  ok(viewElem.length > 0, "creates and appends the view's element");
});

test("should be added to the document body when calling append()", function() {
  view = View.create({
    render: function(buffer) {
      buffer.push("foo bar baz");
    }
  });

  ok(!get(view, 'element'), "precond - should not have an element");
{'fraction_non_alphanumeric': 0.18814306712395884, 'fraction_numerical': 0.0009799118079372856, 'mean_word_length': 3.804705882352941, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '1083341', 'n_tokens_mistral': 670, 'n_tokens_neox': 655, 'n_words': 177}