Created
January 30, 2013 17:07
-
-
Save klaaspieter/4674730 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test("#each accepts a name binding and does not change the context", function() { | |
var controller = Ember.Controller.create({ | |
name: 'bob the controller' | |
}), | |
obj = Ember.Object.create({ | |
name: 'henry the item' | |
}); | |
view = Ember.View.create({ | |
template: templateFor("{{#view}}{{#each item in view.items}}{{name}}{{/each}}{{/view}}"), | |
title: "My Cool Each Test", | |
items: Ember.A([obj]), | |
controller: controller | |
}); | |
append(view); | |
equal(view.$().text(), "henry the item"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment