'use strict';

// Disable JSHint: "Expected an assignment or function call and instead saw an expression."
// Otherwise JSHint dislikes ChaiJS
/*jshint -W030 */

var expect = chai.expect;

describe('angular-ismobile', function () {
	describe('Midway: Module ismobile', function () {});
	describe('Unit: isMobile', function () {
		describe('Run phase', function () {
			var service;

			beforeEach(function () {
				module('ismobile');
			});
			beforeEach(inject(function (isMobile) {
				service = isMobile;
			}));

			it('should be injected and deep equal the "official" isMobile', function () {
				expect(service).to.not.be.undefined;
				expect(service).to.deep.equal(window.isMobile);
			});
		});

		describe('Configuration phase', function () {
			var provider;

			beforeEach(function () {
				angular.module('test.ismobile', ['ismobile'])
					.config(function (isMobileProvider) {
						provider = isMobileProvider;
					});

				module('test.ismobile', 'ismobile');
				inject();
			});

			it('should be injected and deep equal the "official" isMobile', function () {
				var pclone;

				expect(provider).to.not.be.undefined;

				pclone = angular.extend({}, provider);
				// Otherwise a provider won't equal
				delete pclone.$get;
				expect(pclone).to.deep.equal(window.isMobile);
			});
		});
	});
});
@@ -182,16 +182,552 @@
 xpect;%0A%0A
+// PhantomJS %3C 2.0.0 requires Function.prototype.bind polyfill!%0A/*jshint freeze: false */%0AFunction.prototype.bind = Function.prototype.bind %7C%7C function bind(obj) %7B%0A%09var args = Array.prototype.slice.call(arguments, 1),%0A%09%09self = this,%0A%09%09nop = function() %7B%0A%09%09%7D,%0A%09%09bound = function() %7B%0A%09%09%09return self.apply(%0A%09%09%09%09this instanceof nop ? this : (obj %7C%7C %7B%7D), args.concat(%0A%09%09%09%09%09Array.prototype.slice.call(arguments)%0A%09%09%09%09)%0A%09%09%09);%0A%09%09%7D;%0A%09nop.prototype = this.prototype %7C%7C %7B%7D;%0A%09bound.prototype = new nop();%0A%09return bound;%0A%7D;%0A/*jshint freeze: true */%0A%0A
 describe

Add Travis CI #3