/**
 * (c) 2015 Ruben Schmidmeister <ruby@fog.im>
 */

var assert = require('assert'),
    Email  = require('../index');

describe('Email', function() {
  it('emails can be converted to a string', function() {
    assert.equal(Email('cake@example.org') + '', 'cake@example.org');
  });

  it('throws a typerror on invalid emails', function() {
    assert.throws(function() {
      Email('some_asdflkj@')
    }, TypeError);
  });

  it('returns an instance of Email', function() {
    assert(Email('webmaster@example.com') instanceof Email);
  });

  it('is inspectable', function() {
    assert.equal('Email(ruby@fog.im)', Email('ruby@fog.im').inspect());
  });
});
@@ -80,16 +80,44 @@
 sert'),%0A
+    util = require('util'),%0A
     Emai
@@ -682,12 +682,174 @@
 );%0A  %7D);
+%0A%0A  it('has a colored inspect', function()%7B%0A    assert.equal(util.inspect(Email('ruby@fog.im'), %7B colors: true %7D), '%5Cu001b%5B32mEmail(ruby@fog.im)%5Cu001b%5B39m');%0A  %7D)
 %0A%7D);

add test