我目前正在将Ember应用程序升级到Ember 1.3.0稳定版。我在Jasmine测试中遇到了以下问题:
Error: Assertion Failed: You must use Ember.set() to access this property (of [object Object])
at new Error (native)
at Error.Ember.Error (http://localhost:8888/assets/rake-ember.js?body=true:837:23)
at Object.Ember.assert (http://localhost:8888/assets/rake-ember.js?body=true:79:13)
at Object.Ember.MANDATORY_SETTER_FUNCTION [as keywords] (http://localhost:8888/assets/rake-ember.js?body=true:3446:13)
at withHelper (http://localhost:8888/assets/rake-ember.js?body=true:27796:40)
at Object.eval (eval at <anonymous> (http://localhost:8888/assets/rake-handlebars.js?body=true:1500:23), <anonymous>:88:28)
at Handlebars.VM.template (http://localhost:8888/assets/rake-handlebars.js?body=true:2214:33)
at renderPartial (http://localhost:8888/assets/rake-ember.js?body=true:29502:7)
at partialHelper (http://localhost:8888/assets/rake-ember.js?body=true:29479:9)
at Object.eval (eval at <anonymous> (http://localhost:8888/assets/rake-handlebars.js?body=true:1500:23), <anonymous>:54:99)
这似乎发生在下面的代码中:
{{#link-to 'someroute' somemodel titleBinding="view.someproperty"}} Hi! {{/linkTo}}
我们将其缩小到上面的titleBinding
属性,当删除它时 - 我们的测试可以继续运行。有人有任何见解吗?
答案 0 :(得分:1)
尝试使用新的绑定语法title=somepropery