aboutsummaryrefslogtreecommitdiffstats
path: root/src/scenario/output
diff options
context:
space:
mode:
authorIgor Minar2011-01-07 22:02:23 -0800
committerIgor Minar2011-01-10 10:26:55 -0800
commit0a6cf70debc6440685af3f9ea96a66450e4f4ed7 (patch)
tree3b7e82bedf53960deb5d460532779ec449dd8dfc /src/scenario/output
parentc79aba92f6b058742c9ae20a9382f6abc68afcea (diff)
downloadangular.js-0a6cf70debc6440685af3f9ea96a66450e4f4ed7.tar.bz2
Rename angular.foreach to angular.forEach to make the api consistent.
camelcase is used for other angular functions and forEach is also used by EcmaScript standard. - rename the internal as well as the external function name - tweak the implementation of the function so that it doesn't clober it self when we extend the angular object with an object that has a forEach property equal to this forEach function Closes #85
Diffstat (limited to 'src/scenario/output')
-rw-r--r--src/scenario/output/Html.js2
-rw-r--r--src/scenario/output/Xml.js6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/scenario/output/Html.js b/src/scenario/output/Html.js
index 4a682b9a..6e2e20f3 100644
--- a/src/scenario/output/Html.js
+++ b/src/scenario/output/Html.js
@@ -121,7 +121,7 @@ angular.scenario.output('html', function(context, runner) {
*/
function findContext(spec) {
var currentContext = context.find('#specs');
- angular.foreach(model.getDefinitionPath(spec), function(defn) {
+ angular.forEach(model.getDefinitionPath(spec), function(defn) {
var id = 'describe-' + defn.id;
if (!context.find('#' + id).length) {
currentContext.find('> .test-children').append(
diff --git a/src/scenario/output/Xml.js b/src/scenario/output/Xml.js
index cbc55ee7..e8c7f0e3 100644
--- a/src/scenario/output/Xml.js
+++ b/src/scenario/output/Xml.js
@@ -17,7 +17,7 @@ angular.scenario.output('xml', function(context, runner) {
* @param {Object} tree node to serialize
*/
function serializeXml(context, tree) {
- angular.foreach(tree.children, function(child) {
+ angular.forEach(tree.children, function(child) {
var describeContext = $('<describe></describe>');
describeContext.attr('id', child.id);
describeContext.attr('name', child.name);
@@ -26,14 +26,14 @@ angular.scenario.output('xml', function(context, runner) {
});
var its = $('<its></its>');
context.append(its);
- angular.foreach(tree.specs, function(spec) {
+ angular.forEach(tree.specs, function(spec) {
var it = $('<it></it>');
it.attr('id', spec.id);
it.attr('name', spec.name);
it.attr('duration', spec.duration);
it.attr('status', spec.status);
its.append(it);
- angular.foreach(spec.steps, function(step) {
+ angular.forEach(spec.steps, function(step) {
var stepContext = $('<step></step>');
stepContext.attr('name', step.name);
stepContext.attr('duration', step.duration);