diff --git a/lib/index.js b/lib/index.js index cd0a9209..5f02c392 100644 --- a/lib/index.js +++ b/lib/index.js @@ -71,7 +71,10 @@ Embark = { var embarkConfig = readYaml.sync("./embark.yml"); var fileExpression = embarkConfig.contracts || ["app/contracts/**/*.sol", "app/contracts/**/*.se"]; var contractFiles = grunt.file.expand(fileExpression); - var tests = new Test(contractFiles, 'development'); + var blockchainFile = embarkConfig.blockchainConfig || 'config/blockchain.yml'; + var contractFile = embarkConfig.contractsConfig || 'config/contracts.yml'; + + var tests = new Test(contractFiles, blockchainFile, contractFile, 'development'); return tests; } diff --git a/lib/test.js b/lib/test.js index ce474a50..bb7e8362 100644 --- a/lib/test.js +++ b/lib/test.js @@ -1,15 +1,15 @@ var ethersim = require('ethersim'); var web3 = require('web3'); -Test = function(contractFiles, _env) { +Test = function(contractFiles, blockchainFile, contractFile, _env) { this.env = _env || 'development'; this.web3 = web3; this.web3.setProvider(ethersim.web3Provider()); this.contractFiles = contractFiles; Embark.init(this.web3); - Embark.blockchainConfig.loadConfigFile('config/blockchain.yml'); - Embark.contractsConfig.loadConfigFile('config/contracts.yml'); + Embark.blockchainConfig.loadConfigFile(blockchainFile); + Embark.contractsConfig.loadConfigFile(contractFile); Embark.contractsConfig.init(this.contractFiles, this.env); }