var expect = chai.expect,
    assert = chai.assert;

describe('Pablo test suite', function () {
  it('should load the the Pablo library into the browser', function () {
    expect(Pablo).to.be.a('function');
  });

  it('should load the jQuery library into the browser for one of the Collections test', function () {
    expect(jQuery).to.be.a('function');
  });

  it('Pablo is supported in this browser', function () {
    expect(Pablo.isSupported).to.eql(true);
  });
});

describe('Pablo', function () {

  describe('Collections', function () {

    describe('Pablo()', function () {

      it('should return an empty pablo collection when invoked without argument', function () {
        var pCollection   = Pablo();

        expect(pCollection instanceof Pablo.Collection).to.eql(true);
        expect(pCollection.length).to.eql(0);
      });

      it('should return a pablo collection containing a DOM element when invoked with that dom element', function () {
        var targetElement = document.getElementById('test-subjects'),
            pCollection   = Pablo(targetElement);

        expect(pCollection instanceof Pablo.Collection).to.eql(true);
        expect(pCollection.length).to.eql(1);
        expect(pCollection[0].id).to.eql('test-subjects');
      });

      it('should return a pablo collection containing a list when passed a HTMLCollection or NodeList (and excludes text node)', function () {
        var nodeList    = document.getElementById('test-subjects').childNodes,
            pCollection = Pablo(nodeList);

        expect(pCollection instanceof Pablo.Collection).to.eql(true);
        expect(pCollection.length).to.eql(3);
      });

      it('should return a pablo collection containing a list when passed an Array of elements', function () {
        var nodeList = document.getElementById('test-subjects').childNodes,
            asArray  = [],
            pCollection;

          for (var i = 0; i < nodeList.length; i++) {
            asArray.push(nodeList[i]);
          };

        pCollection = Pablo(asArray);

        expect(pCollection instanceof Pablo.Collection).to.eql(true);
        expect(pCollection.length).to.eql(3);
        expect(pCollection[0].id).to.eql('test-subject-a');
        expect(pCollection[1].id).to.eql('test-subject-b');
        expect(pCollection[2].id).to.eql('test-subject-c');
      });

      it('should return a pablo collection containing a list when passed a Array like collection (e.g. jQuery)', function () {
        var jQueryCollection = jQuery('#test-subjects'),
            pCollection      = Pablo(jQueryCollection);

        expect(pCollection instanceof Pablo.Collection);
        expect(pCollection.length).to.eql(1);
        expect(pCollection[0].id).to.eql('test-subjects');
      });

      it('should return a pablo collection containing a list when passed a Pablo collection', function () {
        var pCollection  = Pablo(document.getElementById('test-subjects').children),
            pCollection2 = Pablo(pCollection); 

        expect(pCollection instanceof Pablo.Collection);
        expect(pCollection.length).to.eql(3);
        expect(pCollection[0].id).to.eql('test-subject-a');
        expect(pCollection[1].id).to.eql('test-subject-b');
        expect(pCollection[2].id).to.eql('test-subject-c');
      });
    });
  });

  describe('Collection methods', function () {

  });

});


function notDone () {
  assert.ok(false, 'Test not implemented');
}
@@ -563,16 +563,21 @@
 ('Pablo(
+input
 )', func
@@ -3307,16 +3307,1588 @@
      %7D);
+%0A%0A      it('should return a pablo collection containing a DOM element when passed the appropriate CSS Selector', function () %7B%0A        var pCollection  = Pablo('#test-subjects');%0A%0A        expect(pCollection instanceof Pablo.Collection);%0A        expect(pCollection.length).to.eql(1);%0A        expect(pCollection%5B0%5D.id).to.eql('test-subjects');%0A      %7D);%0A    %7D);%0A%0A    describe('Pablo(element, attribute)', function () %7B%0A      it('should create a new Pablo collection containing the specified element with the specified attributes', function () %7B%0A        var pCollection = Pablo('rect', %7Bx:10, y:10, width:50, height:50%7D);%0A        expect(pCollection instanceof Pablo.Collection).to.eql(true);%0A        expect(pCollection.length).to.eql(1);%0A        debugger;%0A        expect(pCollection%5B0%5D.getAttribute('x')).to.eql('10');%0A        expect(pCollection%5B0%5D.getAttribute('y')).to.eql('10');%0A        expect(pCollection%5B0%5D.getAttribute('width')).to.eql('50');%0A        expect(pCollection%5B0%5D.getAttribute('height')).to.eql('50');%0A      %7D);%0A%0A      it('should create a new Pablo collection containing multiple specified elements with the specified attributes', function () %7B%0A        var pCollection = Pablo(%5B'rect', 'line', 'line'%5D, %7Bstroke:'black'%7D);%0A        expect(pCollection instanceof Pablo.Collection).to.eql(true);%0A        expect(pCollection.length).to.eql(3);%0A        expect(pCollection%5B0%5D.getAttribute('stroke')).to.eql('black');%0A        expect(pCollection%5B1%5D.getAttribute('stroke')).to.eql('black');%0A        expect(pCollection%5B2%5D.getAttribute('stroke')).to.eql('black');%0A      %7D);
 %0A    %7D);

Add test for Pablo() function