/*!
 * isobject <https://github.com/jonschlinkert/isobject>
 *
 * Copyright (c) 2014-2015, Jon Schlinkert.
 * Licensed under the MIT License.
 */

var assert = require('assert');
var isObject = require('./');

it('should be true when the value is an object.', function () {
  assert(isObject({}) === true);
  assert(isObject(Object.create({})) === true);
  assert(isObject(Object.create(Object.prototype)) === true);
  assert(isObject(Object.create(null)) === true);
  assert(isObject({foo: 'bar'}) === true);

  function Foo() {this.abc = {};};
  assert(isObject(new Foo) === true);
  assert(isObject(/foo/) === true);
});

it('should be true when the value is not an object.', function () {
  assert(isObject(function () {}) === false);
  assert(isObject(1) === false);
  assert(isObject(['foo', 'bar']) === false);
  assert(isObject(null) === false);
  assert(isObject([]) === false);
});

@@ -288,25 +288,16 @@
 ject(%7B%7D)
- === true
 );%0A  ass
@@ -327,25 +327,16 @@
 ate(%7B%7D))
- === true
 );%0A  ass
@@ -380,25 +380,16 @@
 totype))
- === true
 );%0A  ass
@@ -425,60 +425,8 @@
 ll))
- === true);%0A  assert(isObject(%7Bfoo: 'bar'%7D) === true
 );%0A%0A
@@ -447,24 +447,9 @@
 () %7B
-this.abc = %7B%7D;%7D;
+%7D
 %0A  a
@@ -471,25 +471,16 @@
 new Foo)
- === true
 );%0A  ass
@@ -496,23 +496,18 @@
 ect(
-/foo/) === true
+new Foo())
 );%0A%7D
@@ -570,32 +570,52 @@
 , function () %7B%0A
+  function Foo() %7B%7D%0A
   assert(isObjec
@@ -599,32 +599,33 @@
 o() %7B%7D%0A  assert(
+!
 isObject(functio
@@ -621,33 +621,47 @@
 ect(
-function () %7B%7D) === false
+'whatever'));%0A  assert(!isObject(/foo/)
 );%0A 
@@ -660,32 +660,33 @@
 oo/));%0A  assert(
+!
 isObject(1) === 
@@ -680,26 +680,16 @@
 bject(1)
- === false
 );%0A  ass
@@ -684,32 +684,33 @@
 t(1));%0A  assert(
+!
 isObject(%5B'foo',
@@ -717,26 +717,41 @@
  'bar'%5D)
- === false
+);%0A  assert(!isObject(%5B%5D)
 );%0A  ass
@@ -746,32 +746,33 @@
 (%5B%5D));%0A  assert(
+!
 isObject(null) =
@@ -768,23 +768,23 @@
 ect(
-null) === false
+function () %7B%7D)
 );%0A 
@@ -783,32 +783,33 @@
  %7B%7D));%0A  assert(
+!
 isObject(%5B%5D) ===
@@ -805,21 +805,13 @@
 ect(
-%5B%5D) === false
+null)
 );%0A%7D

clean up, adds a few unit tests