Calling beforeEach and afterEach with nested describe blocks
<p>I'm trying to get some logic to be called before and after each nested describe of a jasmine test suite I'm writing.</p>

<p>I have something like this right now:</p>

<pre class="lang-js prettyprint-override"><code>describe('Outer describe', function () {
    beforeEach(function () {
        login();
        someOtherFunc();
    });

    afterEach(function () {
        logout();
    });

    describe('inner describe', function () {
        it('spec A', function () {
                expect(true).toBe(true);
        });

        it('spec B', function () {
                expect(true).toBe(true);
        });
    });
});
</code></pre>

<p>I'm finding my functions in the <code>beforeEach</code> and <code>afterEach</code> are called for each <code>it</code> inside my inner describe. I only want these to be called once for each inner describe I have in the outer one.</p>

<p>Is this possible?</p>