describe('View object', function() {

	var options;

	/*
	TODO: move tests from eventLimitClick.js about view.name/type into here
	*/

	beforeEach(function() {
		affix('#cal');
		options = {
			defaultDate: '2015-01-01'
		};
	});

	describe('title', function() {

		it('is a correctly defined string', function() {
			$('#cal').fullCalendar(options);
			var view = $('#cal').fullCalendar('getView');
			expect(view.title).toBe('January 2015');
		});

		it('is available in the viewRender callback', function() {
			options.viewRender = function(view) {
				expect(view.title).toBe('January 2015');
			};
			spyOn(options, 'viewRender').and.callThrough();
			$('#cal').fullCalendar(options);
			expect(options.viewRender).toHaveBeenCalled();
		});
	});
});

@@ -35,23 +35,8 @@
  %7B%0A%0A
-%09var options;%0A%0A
 %09/*%0A
@@ -118,64 +118,22 @@
 /%0A%0A%09
-beforeEach(function() %7B%0A%09%09affix('#cal');%0A%09%09o
+pushO
 ptions
- = 
+(
 %7B%0A
-%09
 %09%09de
@@ -156,21 +156,16 @@
 -01-01'%0A
-%09%09%7D;%0A
 %09%7D);%0A%0A%09d
@@ -245,38 +245,28 @@
 tion() %7B%0A%09%09%09
-$('#cal').full
+init
 Calendar(opt
@@ -258,31 +258,24 @@
 nitCalendar(
-options
 );%0A%09%09%09var vi
@@ -279,38 +279,31 @@
  view = 
-$('#cal').full
+current
 Calendar
 ('getVie
@@ -298,18 +298,17 @@
 ndar
-('
+.
 getView
-'
+(
 );%0A%09
@@ -421,24 +421,59 @@
 () %7B%0A%09%09%09
-options.
+var viewRenderSpy = spyOnCalendarCallback('
 viewRend
@@ -474,18 +474,18 @@
 ewRender
- =
+',
  functio
@@ -547,78 +547,18 @@
 %09%09%09%7D
+)
 ;%0A%09%09%09
-spyOn(options, 'viewRender').and.callThrough();%0A%09%09%09$('#cal').full
+init
 Cale
@@ -562,23 +562,16 @@
 alendar(
-options
 );%0A%09%09%09ex
@@ -579,16 +579,8 @@
 ect(
-options.
 view
@@ -585,16 +585,19 @@
 ewRender
+Spy
 ).toHave
@@ -616,17 +616,19 @@
 ;%0A%09%09%7D);%0A
+%0A
 %09%7D);%0A
+%0A
 %7D);%0A

Update tests