diff --git a/boilerplate/spec/contracts/simple_storage.js b/boilerplate/spec/contracts/simple_storage.js deleted file mode 100644 index f8a793144..000000000 --- a/boilerplate/spec/contracts/simple_storage.js +++ /dev/null @@ -1,9 +0,0 @@ -EmbarkSpec = require("embark-framework").specs(); - -SimpleStorage = EmbarkSpec.SimpleStorage; - -SimpleStorage.set(100); - -a = SimpleStorage.get() -console.log(a) - diff --git a/boilerplate/spec/contracts/simple_storage_spec.js b/boilerplate/spec/contracts/simple_storage_spec.js new file mode 100644 index 000000000..551d31e55 --- /dev/null +++ b/boilerplate/spec/contracts/simple_storage_spec.js @@ -0,0 +1,17 @@ +EmbarkSpec = require('embark-framework').Tests; + +describe("SimpleStorage", function() { + beforeAll(function() { + SimpleStorage = EmbarkSpec.request("SimpleStorage", [150]); + }); + + it("should set constructor value", function() { + expect(SimpleStorage.foo()).toEqual('150'); + }); + + it("set storage value", function() { + SimpleStorage.set(100); + expect(SimpleStorage.get()).toEqual('100'); + }); + +}) diff --git a/boilerplate/spec/support/jasmine.json b/boilerplate/spec/support/jasmine.json new file mode 100644 index 000000000..a5f29329d --- /dev/null +++ b/boilerplate/spec/support/jasmine.json @@ -0,0 +1,9 @@ +{ + "spec_dir": "spec", + "spec_files": [ + "**/*[sS]pec.js" + ], + "helpers": [ + "helpers/**/*.js" + ] +} diff --git a/boilerplate/spec/test.js b/boilerplate/spec/test.js deleted file mode 100644 index 42ad17738..000000000 --- a/boilerplate/spec/test.js +++ /dev/null @@ -1,12 +0,0 @@ -var Tests = require('embark-framework').Tests; - -SimpleStorage = Tests.request("SimpleStorage", 150); - -SimpleStorage.set(100); - -a = SimpleStorage.get() -console.log(a) - -a = SimpleStorage.foo() -console.log(a) - diff --git a/lib/test.js b/lib/test.js index ea2da333b..01eafd353 100644 --- a/lib/test.js +++ b/lib/test.js @@ -7,7 +7,7 @@ var grunt = require('grunt'); py_exec = function(cmd) { console.log("python: " + cmd); - return sync(python, cmd)[1]; + return sync(python, cmd)[1].trim(); } py_exec("from ethertdd import EvmContract")