Skip to content

Commit

Permalink
a RingElement is an Element
Browse files Browse the repository at this point in the history
  • Loading branch information
fibo committed Mar 11, 2013
1 parent dd2eebb commit 94dad83
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/RingElement.js
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,15 @@

var util = require('util');

var Element = require('./Element.js');

function RingElement() {
var self = this;

Element.call(self, arguments);
};

util.inherits(RingElement, Element);

module.exports = RingElement;

27 changes: 27 additions & 0 deletions test/Collection.js
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,27 @@

var assert = require('assert');
var algebra = require('../index.js');

var Collection = algebra.Collection;
var Element = algebra.Element;

var e1 = new Element();
var e2 = new Element();
var elements = [e1, e2];

describe('Collection', function () {
describe('constructor:', function () {
it('accepts an array of elements as sinle argument', function () {
var collection = new Collection(elements);

assert.ok(collection instanceof Collection);
});
});

describe('getElements()', function () {
it('returns the collection\'s elements', function () {

});
});
});

24 changes: 24 additions & 0 deletions test/Element.js
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,24 @@

var assert = require('assert');
var algebra = require('../index.js');

var Element = algebra.Element;

describe('Element', function () {
describe('constructor:', function () {
it('', function () {
});
});

describe('getData()', function () {
it('is an abstract function', function () {
});
});

describe('setData()', function () {
it('is an abstract function', function () {
});
});
});


0 comments on commit 94dad83

Please sign in to comment.