Permalink
Browse files

agentManager -> allAgents (for unit test)

  • Loading branch information...
1 parent 98a14ea commit 8576c8677895865112e6b3a33efed998ac0e4c5b @reid reid committed Feb 27, 2013
Showing with 6 additions and 6 deletions.
  1. +6 −6 test/unit/webdriver-collection.js
@@ -53,19 +53,19 @@ function createWdMock(topic, cb) {
};
}
-function MockAgentManager() {
+function MockAllAgents() {
this.agents = {};
EventEmitter2.call(this);
}
-util.inherits(MockAgentManager, EventEmitter2);
+util.inherits(MockAllAgents, EventEmitter2);
-MockAgentManager.prototype.addAgent = function (agent) {
+MockAllAgents.prototype.addAgent = function (agent) {
this.agents[agent.id] = agent;
this.emit("newAgent", agent);
};
-MockAgentManager.prototype.removeAgent = function (agent) {
+MockAllAgents.prototype.removeAgent = function (agent) {
delete this.agents[agent.id];
};
@@ -80,7 +80,7 @@ function createHubMock(topic) {
}
},
webdriver: topic.wdOptions,
- agentManager: new MockAgentManager()
+ allAgents: new MockAllAgents()
};
}
@@ -156,7 +156,7 @@ vows.describe("WebDriver Collection").addBatch({
topic.wdYoshi.on("navigate", function (url) {
topic.events.navigate.push(url);
- topic.hubMock.agentManager.addAgent({
+ topic.hubMock.allAgents.addAgent({
id: /[\d]+$/.exec(url)[0]
});
});

0 comments on commit 8576c86

Please sign in to comment.