var assert = require('assert');
var expect = require('chai').expect;

var Fabric = require('../');
var Machine = Fabric.Machine;

describe('Machine', function () {
  it('should correctly compute a known instruction', function () {
    var machine = new Machine();

    machine.use('OP_TEST', function (state) {
      return true;
    });

    machine.stack.push('OP_TEST');

    machine.compute();

    assert.equal(machine['@data'], true);
    assert.equal(machine.clock, 1);
  });
});

var assert = require('assert');
var expect = require('chai').expect;

var Fabric = require('../');
var Machine = Fabric.Machine;

describe('Machine', function () {
  it('should correctly compute a known instruction', function () {
    var machine = new Machine();

    machine.define('OP_TEST', function (state) {
      return true;
    });

    machine.stack.push('OP_TEST');

    machine.step();

    assert.equal(machine['@data'], true);
    assert.equal(machine.clock, 1);
  });
});

Include step stubs for Machine test
Include step stubs for Machine test
