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

var subject = require('../');

var validString = '';
var validRadix  = 10;

describe('index', function() {
  it('exports a single function', function () {
    expect(subject).to.be.a('function');
  });

  it('returns a promise', function() {
    expect(subject(validString, validRadix).then).to.be.a('function');
  });

  it('supports passing an optional callback', function(done) {
    subject(validString, validRadix, function (error, result) {
      expect(error).to.not.exist;
      expect(result).to.be.ok;
      done();
    });
  });

  it('resolves to an array', function() {
    return subject(validString, validRadix).then(function (result) {
      expect(result).to.be.an('array');
    });
  });
});

@@ -81,16 +81,25 @@
 ring = '
+1,3-5,7-9
 ';%0Avar v
@@ -745,13 +745,421 @@
 );%0A  %7D);
+%0A%0A  describe('examples', function() %7B%0A    it('defaults to radix=10', function() %7B%0A      return subject(validString).then(function (result) %7B%0A        expect(result).to.include.members(%5B1,3,4,5,7,8,9%5D);%0A      %7D);%0A    %7D);%0A%0A    it('supports setting a radix', function() %7B%0A      return subject('10,100-110', 2).then(function (result) %7B%0A        expect(result).to.include.members(%5B2,4,5,6%5D);%0A      %7D);%0A    %7D);%0A  %7D);
 %0A%7D);%0A

Implement example tests