title: Error: Non-assignable model expression: undefined
body: <p>I'm trying to write tests for a directive, so I'm constructing it by hand with <code>$compile</code>. (Yes, I know that I can use e2e tests for this, but in this case I want to test some DOM independent logic so I'm using the unit test approach.)</p>
  
  <p>I have a field that I'm binding to with <code>scope: {foo: '='}</code>. When I try to set it on the directive's scope, I get the following error:</p>
  
  <pre><code>Error: Non-assignable model expression: undefined (directive: foo)
      at Error (&lt;anonymous&gt;)
      at $get.parentSet (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.js:4146:25)
      at Object.&lt;anonymous&gt; (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.js:4160:23)
      at Object.$get.Scope.$digest (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.js:7693:38)
      at Object.$get.Scope.$apply (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.js:7894:24)
      at SNAKE_CASE_REGEXP (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.js:930:13)
      at Object.invoke (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.js:2788:25)
      at bootstrap (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.js:928:12)
      at angularInit (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.js:904:5)
      at https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.js:14397:5 
  </code></pre>
  
  <p>Reproduced in this <a href="http://jsfiddle.net/_nth/u4BTu/5/">fiddle</a>.</p>