Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

agentManager -> allAgents (for unit test)

  • Loading branch information...
commit 8576c8677895865112e6b3a33efed998ac0e4c5b 1 parent 98a14ea
@reid reid authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 test/unit/webdriver-collection.js
View
12 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]
});
});
Please sign in to comment.
Something went wrong with that request. Please try again.