From 6712fc294c1ae8e210e6bd28c911ce7a0e1c31bb Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 30 May 2018 17:35:54 -0400 Subject: [PATCH] change another storage test --- lib/tests/test.js | 7 +++++-- test_apps/contracts_app/test/simple_storage_spec.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/tests/test.js b/lib/tests/test.js index 8049ceb09..4e2b8e2f7 100644 --- a/lib/tests/test.js +++ b/lib/tests/test.js @@ -81,6 +81,9 @@ class Test { if (!callback) { callback = function () {}; } + if (!options.contracts) { + throw new Error(__('No contracts specified in the options')); + } this.options = utils.recursiveMerge(this.options, options); this.simOptions = this.options.simulatorOptions || {}; this.ready = false; @@ -145,8 +148,8 @@ class Test { } require(module) { - if (module.startsWith('contracts/')) { - const contractName = module.substr(10); + if (module.startsWith('Embark/contracts/')) { + const contractName = module.substr(17); if (!this.engine.contractsManager.contracts[contractName]) { throw new Error(__('No contract with the name %s', contractName)); } diff --git a/test_apps/contracts_app/test/simple_storage_spec.js b/test_apps/contracts_app/test/simple_storage_spec.js index f8aeccf2a..0eba871ab 100644 --- a/test_apps/contracts_app/test/simple_storage_spec.js +++ b/test_apps/contracts_app/test/simple_storage_spec.js @@ -1,6 +1,6 @@ /*global contract, config, it, embark*/ const assert = require('assert'); -const SimpleStorage = embark.require('contracts/SimpleStorage'); +const SimpleStorage = embark.require('Embark/contracts/SimpleStorage'); config({ contracts: {