/**
 * @overview Jasmin test case.
 * @see {@link http://pivotal.github.io/jasmine/ | jasmine}
 */
describe('apeman-disable-while-test', function () {
    var ap;
    beforeEach(function () {
        ap = apeman;
    });
    it('Apeman disable while.', function () {
        var $scope = {};
        $scope.returnSomething = function () {
            return 'foo';
        };
        runs(function () {
            ap.disableWhile($scope, 'returnSomething', 5);
            expect($scope.returnSomething()).not.toBeDefined();
        });
        waitsFor(function () {
            return $scope.returnSomething();
        }, 'Waite while disabled.');
        runs(function () {
            expect($scope.returnSomething()).toEqual('foo');
        });
    });
});