Skip to content

Commit

Permalink
process.mixin is deprecated.
Browse files Browse the repository at this point in the history
  • Loading branch information
greut authored and polotek committed Apr 27, 2010
1 parent 16d7dc1 commit 7903666
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 15 deletions.
2 changes: 1 addition & 1 deletion spec/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports.clone = function(obj) {

var temp = new obj.constructor();
for(var key in obj)
temp[key] = clone(obj[key]);
temp[key] = arguments.callee(obj[key]);

return temp;
};
Expand Down
4 changes: 3 additions & 1 deletion spec/spec_attribute.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process.mixin(require('./helpers'));
with(require('./helpers')) {

describe('Attribute', function() {
var doc = null;
Expand Down Expand Up @@ -69,3 +69,5 @@ describe('Attribute', function() {
assert(!node.attr('attr-one-key'));
});
});

}
4 changes: 3 additions & 1 deletion spec/spec_document.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process.mixin(require('./helpers'));
with(require('./helpers')) {

describe('A new document', function() {
it('can be instantiated with nothing', function() {
Expand Down Expand Up @@ -121,3 +121,5 @@ describe('A new document', function() {
assertEqual(control, doc.toString());
});
});

}
4 changes: 3 additions & 1 deletion spec/spec_element.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process.mixin(require('./helpers'));
with(require('./helpers')) {

describe('An element node', function() {
var doc = null;
Expand Down Expand Up @@ -123,3 +123,5 @@ describe('An element node', function() {
assertEqual('next-sibling', children[1].name());
});
});

}
4 changes: 3 additions & 1 deletion spec/spec_html_parser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process.mixin(require('./helpers'));
with(require('./helpers')) {

var recoverableFile = path.dirname(__filename)+'/fixtures/warnings/amp.html';
var recoverableErrors = [
Expand Down Expand Up @@ -87,3 +87,5 @@ describe('A recoverable parse error when parsing an HTML string', function() {
assertEqual(recoverableErrors, doc.errors());
});
});

}
4 changes: 3 additions & 1 deletion spec/spec_main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process.mixin(require('./helpers'));
with(require('./helpers')) {

describe('libxmljs', function() {
it('has a version number', function() {
Expand All @@ -16,3 +16,5 @@ describe('libxmljs', function() {
assert(typeof libxml.libxml_parser_version == 'string');
});
});

}
4 changes: 3 additions & 1 deletion spec/spec_namespaces.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process.mixin(require('./helpers'));
with(require('./helpers')) {

describe('A namespace', function() {
it('can be created and not set', function() {
Expand Down Expand Up @@ -88,3 +88,5 @@ describe('A namespace', function() {
assert(!elem.namespace());
});
});

}
4 changes: 3 additions & 1 deletion spec/spec_node_attributes.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process.mixin(require('./helpers'));
with(require('./helpers')) {

describe('A node attribute', function() {
it('can be read', function() {
Expand Down Expand Up @@ -75,3 +75,5 @@ describe('A node attribute', function() {
assertEqual(doc, elem.attr('foo').doc());
});
});

}
3 changes: 2 additions & 1 deletion spec/spec_searching.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process.mixin(require('./helpers'));
with(require('./helpers')) {

describe('Finding a node', function() {
it('can be done with #get', function() {
Expand Down Expand Up @@ -134,3 +134,4 @@ describe('Finding a prefixed namespaced node', function() {
});
});

}
4 changes: 3 additions & 1 deletion spec/spec_text_node.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process.mixin(require('./helpers'));
with(require('./helpers')) {

describe('Text node', function() {
it('knows its type is "text"', function() {
Expand All @@ -9,3 +9,5 @@ describe('Text node', function() {
assertEqual('text', doc.child().type());
});
});

}
4 changes: 3 additions & 1 deletion spec/spec_traversal.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process.mixin(require('./helpers'));
with(require('./helpers')) {

describe('Document traversal on a built document', function() {
it('can get to the document from any node', function() {
Expand Down Expand Up @@ -164,3 +164,5 @@ describe('Document traversal on a parsed document', function() {
assertEqual(null, child.nextElement().nextElement());
});
});

}
4 changes: 3 additions & 1 deletion spec/spec_xml_parse_errors.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process.mixin(require('./helpers'));
with(require('./helpers')) {

describe('Parse error object', function() {
var synErr = null;
Expand Down Expand Up @@ -27,3 +27,5 @@ describe('Parse error object', function() {
});
}
});

}
4 changes: 3 additions & 1 deletion spec/spec_xml_parser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process.mixin(require('./helpers'));
with(require('./helpers')) {

describe('Parsing XML', function() {
var filename = path.dirname(__filename)+'/fixtures/parser.xml';
Expand Down Expand Up @@ -130,3 +130,5 @@ describe('A recoverable parse error when parsing an XML string', function() {
assertEqual(err, doc.errors()[0]);
});
});

}
4 changes: 3 additions & 1 deletion spec/spec_xml_sax_parser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process.mixin(require('./helpers'));
with(require('./helpers')) {

describe("SAX Push Parser", function() {
var callbacks = {};
Expand Down Expand Up @@ -107,3 +107,5 @@ describe("SAX Push Parser", function() {
assert(true);
});
});

}
3 changes: 2 additions & 1 deletion spec/tacular.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
* Copyright 2009, Jon Crosby, MIT Licensed
*
*/
process.mixin(require('sys'));

(function() {
with(require('sys')) {
var path = require('path');
var fs = require('fs');
var specCount = 0;
Expand Down Expand Up @@ -230,4 +230,5 @@ process.mixin(require('sys'));
process.addListener("exit", function () {
summarize();
});
}
})();

0 comments on commit 7903666

Please sign in to comment.