Fix incomplete and skipped test
diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php
index 94dafdc..39c24b2 100644
--- a/tests/Bootstrap.php
+++ b/tests/Bootstrap.php
@@ -11,6 +11,7 @@
 define('PROJECT_BASE',	realpath($dir.'/../').'/');
 define('BASEPATH',		PROJECT_BASE.'system/');
 define('APPPATH',		PROJECT_BASE.'application/');
+define('VIEWPATH',		PROJECT_BASE.'');
 
 
 // Prep our test environment
diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php
index dcc3d08..a414f0a 100644
--- a/tests/codeigniter/core/Lang_test.php
+++ b/tests/codeigniter/core/Lang_test.php
@@ -6,6 +6,9 @@
 	
 	public function set_up()
 	{
+		$loader_cls = $this->ci_core_class('load');
+		$this->ci_instance_var('load', new $loader_cls);
+
 		$cls = $this->ci_core_class('lang');
 		$this->lang = new $cls;
 	}
@@ -14,17 +17,14 @@
 	
 	public function test_load()
 	{
-		// get_config needs work
-		$this->markTestIncomplete('get_config needs work');
-		//$this->assertTrue($this->lang->load('profiler'));
+		$this->assertTrue($this->lang->load('profiler', 'english'));
 	}
 	
 	// --------------------------------------------------------------------
 
 	public function test_line()
 	{
-		$this->markTestIncomplete('get_config needs work');
-		
+		$this->assertTrue($this->lang->load('profiler', 'english'));
 		$this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string'));
 	}
 	
diff --git a/tests/codeigniter/helpers/date_helper_test.php b/tests/codeigniter/helpers/date_helper_test.php
index c7a2c9b..662d164 100644
--- a/tests/codeigniter/helpers/date_helper_test.php
+++ b/tests/codeigniter/helpers/date_helper_test.php
@@ -5,9 +5,39 @@
 {
 	// ------------------------------------------------------------------------
 
-	public function test_now()
+	public function test_now_local()
 	{
-		$this->markTestIncomplete('not implemented yet');
+		// This stub job, is simply to cater $config['time_reference']
+		$config = $this->getMock('CI_Config');
+		$config->expects($this->any())
+			   ->method('item')
+			   ->will($this->returnValue('local'));
+		
+		// Add the stub to our test instance
+		$this->ci_instance_var('config', $config);
+
+		$expected = time();
+		$test = now();
+		$this->assertEquals($expected, $test);
+	}
+
+	// ------------------------------------------------------------------------
+
+	public function test_now_gmt()
+	{
+		// This stub job, is simply to cater $config['time_reference']
+		$config = $this->getMock('CI_Config');
+		$config->expects($this->any())
+			   ->method('item')
+			   ->will($this->returnValue('gmt'));
+		
+		// Add the stub to our stdClass
+		$this->ci_instance_var('config', $config);
+
+		$t = time();
+		$expected = mktime(gmdate("H", $t), gmdate("i", $t), gmdate("s", $t), gmdate("m", $t), gmdate("d", $t), gmdate("Y", $t));
+		$test = now();
+		$this->assertEquals($expected, $test);
 	}
 
 	// ------------------------------------------------------------------------
@@ -124,7 +154,16 @@
 
 	public function test_timespan()
 	{
-		$this->markTestIncomplete('not implemented yet');
+		$loader_cls = $this->ci_core_class('load');
+		$this->ci_instance_var('load', new $loader_cls);
+
+		$lang_cls = $this->ci_core_class('lang');
+		$this->ci_instance_var('lang', new $lang_cls);
+
+		$this->assertEquals('1 Second', timespan(time(), time()+1));
+		$this->assertEquals('1 Minute', timespan(time(), time()+60));
+		$this->assertEquals('1 Hour', timespan(time(), time()+3600));
+		$this->assertEquals('2 Hours', timespan(time(), time()+7200));
 	}
 
 	// ------------------------------------------------------------------------
@@ -140,7 +179,9 @@
 
 	public function test_local_to_gmt()
 	{
-		$this->markTestIncomplete('not implemented yet');
+		$t = time();
+		$expected = mktime(gmdate("H", $t), gmdate("i", $t), gmdate("s", $t), gmdate("m", $t), gmdate("d", $t), gmdate("Y", $t));
+		$this->assertEquals($expected, local_to_gmt($t));
 	}
 
 	// ------------------------------------------------------------------------
@@ -177,9 +218,10 @@
 
 	public function test_human_to_unix()
 	{
-		$time = time();
-		$this->markTestIncomplete('Failed Test');
-		// $this->assertEquals($time, human_to_unix(unix_to_human($time)));
+		$date = '2000-12-31 10:00:00 PM';
+		$expected = strtotime($date);
+		$this->assertEquals($expected, human_to_unix($date));
+		$this->assertFalse(human_to_unix());
 	}
 
 	// ------------------------------------------------------------------------
diff --git a/tests/codeigniter/helpers/inflector_helper_test.php b/tests/codeigniter/helpers/inflector_helper_test.php
index ef1f54a..e476f6d 100644
--- a/tests/codeigniter/helpers/inflector_helper_test.php
+++ b/tests/codeigniter/helpers/inflector_helper_test.php
@@ -24,14 +24,10 @@
 	
 	public function test_plural()
 	{
-		$this->markTestSkipped(
-		              'abjectness is breaking.  SKipping for the time being.'
-		            );
-		
 		$strs = array(
 			'telly'			=> 'tellies',
 			'smelly'		=> 'smellies',
-			'abjectness'	=> 'abjectness',
+			'abjectness'	=> 'abjectnesses', // ref : http://en.wiktionary.org/wiki/abjectnesses
 			'smell'			=> 'smells',
 			'witch'			=> 'witches'
 		);
diff --git a/tests/codeigniter/libraries/Table_test.php b/tests/codeigniter/libraries/Table_test.php
index 045216b..0208a46 100644
--- a/tests/codeigniter/libraries/Table_test.php
+++ b/tests/codeigniter/libraries/Table_test.php
@@ -194,11 +194,8 @@
 	{
 		// Test bogus parameters
 		$this->assertFalse($this->table->make_columns('invalid_junk'));
-		$this->assertFalse( $this->table->make_columns(array()));
-		// $this->assertFalse(
-		// 	$this->table->make_columns(array('one', 'two')),
-		// 	'2.5' // not an integer!
-		// );
+		$this->assertFalse($this->table->make_columns(array()));
+		$this->assertFalse($this->table->make_columns(array('one', 'two'), '2.5'));
 		
 		
 		// Now on to the actual column creation
@@ -222,8 +219,6 @@
 			),
 			$this->table->make_columns($five_values, 3)
 		);
-		
-		$this->markTestSkipped('Look at commented assertFalse above');
 	}
 	
 	public function test_clear()
@@ -301,7 +296,47 @@
 	
 	function test_set_from_object()
 	{
-		$this->markTestSkipped('Not yet implemented.');
+		$reflectionOfTable = new ReflectionClass($this->table);
+		$method = $reflectionOfTable->getMethod('_set_from_object');
+		
+		$method->setAccessible(true);
+
+		// Make a stub of query instance
+		$query = new CI_TestCase();
+		$query->list_fields = function(){
+			return array('name', 'email');
+		};
+		$query->result_array = function(){
+			return array(
+					array('name' => 'John Doe', 'email' => 'john@doe.com'),
+					array('name' => 'Foo Bar', 'email' => 'foo@bar.com'),
+				);
+		};
+		$query->num_rows = function(){
+			return 2;
+		};
+
+		$expected_heading = array(
+			array('data' => 'name'),
+			array('data' => 'email')
+		);
+
+		$expected_second = array(
+			'name' => array('data' => 'Foo Bar'),
+			'email' => array('data' => 'foo@bar.com'),
+		);
+
+		$method->invokeArgs($this->table, array($query));
+
+		$this->assertEquals(
+			$expected_heading,
+			$this->table->heading
+		);
+		
+		$this->assertEquals(
+			$expected_second,
+			$this->table->rows[1]
+		);
 	}
 	
 	// Test main generate method
diff --git a/tests/lib/ci_testcase.php b/tests/lib/ci_testcase.php
index 8ca71fd..afccee0 100644
--- a/tests/lib/ci_testcase.php
+++ b/tests/lib/ci_testcase.php
@@ -172,6 +172,23 @@
 	{
 		return $this->ci_config;
 	}
+
+	// --------------------------------------------------------------------
+	
+	/**
+	 * This overload is useful to create a stub, that need to have a specific method.
+	 */
+	function __call($method, $args)
+	{
+		if ($this->{$method} instanceof Closure) 
+		{
+			return call_user_func_array($this->{$method},$args);
+		} 
+		else 
+		{
+			return parent::__call($method, $args);
+		}
+	}
 }
 
 // EOF
\ No newline at end of file