Skip to content

Commit 668e0be

Browse files
committed
Setting web3 on Embark Test constructor so it can be used before deploying contracts
1 parent 64f390e commit 668e0be

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ var Test = function(options) {
1919
console.log('For more information see https://github.com/ethereumjs/testrpc');
2020
exit();
2121
}
22+
23+
this.web3 = new Web3();
24+
this.web3.setProvider(this.sim.provider());
2225
};
2326

2427
Test.prototype.deployAll = function(contractsConfig, cb) {
2528
var self = this;
26-
this.web3 = new Web3();
27-
this.web3.setProvider(this.sim.provider());
2829
var logger = new TestLogger({logLevel: 'debug'});
2930

3031
async.waterfall([

0 commit comments

Comments
 (0)