angular-ui/angular-ui — pull request #489 by ataube (2013-03-17 02:11:21+00:00)
Title: Fix for #434

Hey @ProLoser:
I finally found a solution to fix the tests with scope = true for the ui-route directive. Note there are still tests which test the multi scope support. I made some experiments with the following example which works fine if there is no ng-model defined but I was not able to integrate it without a big refactoring of routeSpec...

it('should support multiple scopes', function() {
setPath('/foo');
elm = $('
Foo
Bar

');
$compile(elm[0])(scope);
expect(elm.find('li').eq(0).scope()["modelProp"]).toBe(true);
expect(elm.find('li').eq(1).scope()["modelProp"]).toBe(false);
setPath('/bar');
expect(elm.find('li').eq(0).scope()["modelProp"]).toBe(false);
expect(elm.find('li').eq(1).scope()["modelProp"]).toBe(true);
});