<li><a href="#/view2">view2</a></li>
</ul>
- <ng-view></ng-view>
+ <div ng-view></div>
<div>Angular seed app: v<span app-version></span></div>
it('should render view1 when user navigates to /view1', function() {
- expect(element('ng-view p:first').text()).
+ expect(element('[ng-view] p:first').text()).
toMatch(/partial for view 1/);
});
it('should render view1 when user navigates to /view2', function() {
- expect(element('ng-view p:first').text()).
+ expect(element('[ng-view] p:first').text()).
toMatch(/partial for view 2/);
});
--- /dev/null
+/* jasmine specs for directives go here */
+
+describe('directives', function() {
+ beforeEach(module('myApp.directives'));
+
+ describe('app-version', function() {
+ it('should print current version', function() {
+ module(function($provide) {
+ $provide.value('version', 'TEST_VER');
+ });
+ inject(function($compile, $rootScope) {
+ var element = $compile('<span app-version></span>')($rootScope);
+ expect(element.text()).toEqual('TEST_VER');
+ });
+ });
+ });
+});
+++ /dev/null
-/* jasmine specs for widgets go here */
-
-describe('widgets', function() {
- beforeEach(module('myApp.widgets'));
-
- describe('app-version', function() {
- it('should print current version', function() {
- module(function($provide) {
- $provide.value('version', 'TEST_VER');
- });
- inject(function($compile, $rootScope) {
- var element = $compile('<span app-version></span>')($rootScope);
- expect(element.text()).toEqual('TEST_VER');
- });
- });
- });
-});