Allow custom spy strategies to be inherited like other runnable resources
This commit is contained in:
@@ -1604,6 +1604,9 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
resources.customObjectFormatters = j$.util.clone(
|
resources.customObjectFormatters = j$.util.clone(
|
||||||
runnableResources[parentRunnableId].customObjectFormatters
|
runnableResources[parentRunnableId].customObjectFormatters
|
||||||
);
|
);
|
||||||
|
resources.customSpyStrategies = j$.util.clone(
|
||||||
|
runnableResources[parentRunnableId].customSpyStrategies
|
||||||
|
);
|
||||||
resources.defaultStrategyFn =
|
resources.defaultStrategyFn =
|
||||||
runnableResources[parentRunnableId].defaultStrategyFn;
|
runnableResources[parentRunnableId].defaultStrategyFn;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ describe('Custom Spy Strategies (Integration)', function() {
|
|||||||
var jasmineDone = jasmine.createSpy('jasmineDone');
|
var jasmineDone = jasmine.createSpy('jasmineDone');
|
||||||
|
|
||||||
env.describe('suite defining a custom spy strategy', function() {
|
env.describe('suite defining a custom spy strategy', function() {
|
||||||
env.beforeEach(function() {
|
env.beforeAll(function() {
|
||||||
env.addSpyStrategy('frobnicate', strategy);
|
env.addSpyStrategy('frobnicate', strategy);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -441,6 +441,9 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
resources.customObjectFormatters = j$.util.clone(
|
resources.customObjectFormatters = j$.util.clone(
|
||||||
runnableResources[parentRunnableId].customObjectFormatters
|
runnableResources[parentRunnableId].customObjectFormatters
|
||||||
);
|
);
|
||||||
|
resources.customSpyStrategies = j$.util.clone(
|
||||||
|
runnableResources[parentRunnableId].customSpyStrategies
|
||||||
|
);
|
||||||
resources.defaultStrategyFn =
|
resources.defaultStrategyFn =
|
||||||
runnableResources[parentRunnableId].defaultStrategyFn;
|
runnableResources[parentRunnableId].defaultStrategyFn;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user