Sha256: 5298f55c20b3d66b464d3ffcb86d3600c44d0d40479391a4e0936af161724113

Contents?: true

Size: 1017 Bytes

Versions: 10

Compression:

Stored size: 1017 Bytes

Contents

describe("#noConflict", function() {
  var subject,noConflicted,cache;
  beforeEach(function() {
    cache = {
      jasmineFixture: window.jasmineFixture,
      affix: window.affix,
      jasmineDotFixture: jasmine.fixture
    };

    subject = window.jasmineFixture($);

    noConflicted = subject.noConflict();
  });

  afterEach(function() {
    window.jasmineFixture = cache.jasmineFixture;
    window.affix = cache.affix;
    jasmine.fixture = cache.jasmineDotFixture;
  });

  it("returns itself when noConflicted", function() {
    expect(subject).toBe(noConflicted);
  });

  it("returns control of jasmineFixture to the thing that owned it first", function() {
    //see the specRunner HTML for the source to this magic string
    expect(window.jasmineFixture).toEqual("Thing that owned jasmineFixture first");
  });

  it("clears window.inject", function() {
    expect(window.inject).not.toBeDefined();
  });

  it("clears window.affix", function() {
    expect(window.affix).not.toBeDefined();
  });
});

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
hooch-0.4.2 jasmine/jasmine-fixture-1.3.1/spec/no-conflict-spec.js
hooch-0.4.1 jasmine/jasmine-fixture-1.3.1/spec/no-conflict-spec.js
hooch-0.4.0 jasmine/jasmine-fixture-1.3.1/spec/no-conflict-spec.js
hooch-0.3.0 jasmine/jasmine-fixture-1.3.1/spec/no-conflict-spec.js
hooch-0.2.1 jasmine/jasmine-fixture-1.3.1/spec/no-conflict-spec.js
hooch-0.2.0 jasmine/jasmine-fixture-1.3.1/spec/no-conflict-spec.js
hooch-0.1.0 jasmine/jasmine-fixture-1.3.1/spec/no-conflict-spec.js
hooch-0.0.8 jasmine/jasmine-fixture-1.3.1/spec/no-conflict-spec.js
hooch-0.0.7 jasmine/jasmine-fixture-1.3.1/spec/no-conflict-spec.js
hooch-0.0.6 jasmine/jasmine-fixture-1.3.1/spec/no-conflict-spec.js