add spec to boilerplate

This commit is contained in:
Iuri Matias 2015-06-15 05:46:18 -04:00
parent 1e5d704061
commit dca33e02fc
5 changed files with 27 additions and 22 deletions

View File

@ -1,9 +0,0 @@
EmbarkSpec = require("embark-framework").specs();
SimpleStorage = EmbarkSpec.SimpleStorage;
SimpleStorage.set(100);
a = SimpleStorage.get()
console.log(a)

View File

@ -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');
});
})

View File

@ -0,0 +1,9 @@
{
"spec_dir": "spec",
"spec_files": [
"**/*[sS]pec.js"
],
"helpers": [
"helpers/**/*.js"
]
}

View File

@ -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)

View File

@ -7,7 +7,7 @@ var grunt = require('grunt');
py_exec = function(cmd) { py_exec = function(cmd) {
console.log("python: " + cmd); console.log("python: " + cmd);
return sync(python, cmd)[1]; return sync(python, cmd)[1].trim();
} }
py_exec("from ethertdd import EvmContract") py_exec("from ethertdd import EvmContract")