Sha256: 2e0502281ee59cca9e7366ada9fcd7c691cb015988960b527a5da506ed80d570

Contents?: true

Size: 1.23 KB

Versions: 13

Compression:

Stored size: 1.23 KB

Contents

describe("jasmine.MultiReporter", function() {
  var multiReporter, fakeReporter1, fakeReporter2;

  beforeEach(function() {
    multiReporter = new jasmine.MultiReporter();
    fakeReporter1 = jasmine.createSpyObj("fakeReporter1", ["reportSpecResults"]);
    fakeReporter2 = jasmine.createSpyObj("fakeReporter2", ["reportSpecResults", "reportRunnerStarting"]);
    multiReporter.addReporter(fakeReporter1);
    multiReporter.addReporter(fakeReporter2);
  });

  it("should support all the method calls that jasmine.Reporter supports", function() {
    multiReporter.reportRunnerStarting();
    multiReporter.reportRunnerResults();
    multiReporter.reportSuiteResults();
    multiReporter.reportSpecResults();
    multiReporter.log();
  });

  it("should delegate to any and all subreporters", function() {
    multiReporter.reportSpecResults('blah', 'foo');
    expect(fakeReporter1.reportSpecResults).wasCalledWith('blah', 'foo');
    expect(fakeReporter2.reportSpecResults).wasCalledWith('blah', 'foo');
  });

  it("should quietly skip delegating to any subreporters which lack the given method", function() {
    multiReporter.reportRunnerStarting('blah', 'foo');
    expect(fakeReporter2.reportRunnerStarting).wasCalledWith('blah', 'foo');
  });
});

Version data entries

13 entries across 13 versions & 5 rubygems

Version Path
shuriken-0.2.1 vendor/jasmine-0.10.0/spec/suites/MultiReporterSpec.js
evergreen-0.1 lib/jasmine/spec/suites/MultiReporterSpec.js
shuriken-0.1.4 vendor/jasmine-0.10.0/spec/suites/MultiReporterSpec.js
shuriken-0.1.3.1 vendor/jasmine-0.10.0/spec/suites/MultiReporterSpec.js
shuriken-0.1.3 vendor/jasmine-0.10.0/spec/suites/MultiReporterSpec.js
jasnode-0.4.3.0 jasmine/spec/suites/MultiReporterSpec.js
jasnode-0.4.2.0 jasmine/spec/suites/MultiReporterSpec.js
jasnode-0.4.1.0 jasmine/spec/suites/MultiReporterSpec.js
jasnode-0.4.0.0 jasmine/spec/suites/MultiReporterSpec.js
jasnode-0.2.0.0 jasmine/spec/suites/MultiReporterSpec.js
jazz-0.1.1 vendor/jasmine/spec/suites/MultiReporterSpec.js
jazrb-0.1.1 vendor/jasmine/spec/suites/MultiReporterSpec.js
jazrb-0.1.0 vendor/jasmine/spec/suites/MultiReporterSpec.js