diff --git a/auto/generate_test_runner.rb b/auto/generate_test_runner.rb
index b221663..8625670 100644
--- a/auto/generate_test_runner.rb
+++ b/auto/generate_test_runner.rb
@@ -9,7 +9,7 @@ File.expand_path(File.join(File.dirname(__FILE__),'colour_prompt'))
 class UnityTestRunnerGenerator
 
   def initialize(options = nil)
-    @options = { :includes => [], :framework => :unity }
+    @options = { :includes => [], :plugins => [], :framework => :unity }
     case(options)
       when NilClass then @options
       when String   then @options.merge!(UnityTestRunnerGenerator.grab_config(options))
@@ -19,16 +19,12 @@ class UnityTestRunnerGenerator
   end
   
   def self.grab_config(config_file)
-    options = { :includes => [], :framework => :unity }
+    options = { :includes => [], :plugins => [], :framework => :unity }
     unless (config_file.nil? or config_file.empty?)
       require 'yaml'
       yaml_guts = YAML.load_file(config_file)
-      yaml_goodness = yaml_guts[:unity] ? yaml_guts[:unity] : yaml_guts[:cmock]
-      raise "No :unity or :cmock section found in #{config_file}" unless yaml_goodness
-      options[:cexception] = 1 unless (yaml_goodness[:plugins] & ['cexception', :cexception]).empty?
-      options[:order]      = 1 if     (yaml_goodness[:enforce_strict_ordering])
-      options[:framework]  =          (yaml_goodness[:framework] || :unity)
-      options[:includes]   <<         (yaml_goodness[:includes])
+      options.merge!(yaml_guts[:unity] ? yaml_guts[:unity] : yaml_guts[:cmock])
+      raise "No :unity or :cmock section found in #{config_file}" unless options
     end
     return(options)
   end
@@ -38,7 +34,7 @@ class UnityTestRunnerGenerator
     includes = []
     used_mocks = []
     
-    @options = options unless options.nil?
+    @options.merge!(options) unless options.nil?
     module_name = File.basename(input_file)
     
     #pull required data from source file
@@ -47,8 +43,6 @@ class UnityTestRunnerGenerator
       includes   = find_includes(input)
       used_mocks = find_mocks(includes)
     end
-    
-    puts "Creating test runner for #{module_name}..."
 
     #build runner file
     File.open(output_file, 'w') do |output|
@@ -126,13 +120,13 @@ class UnityTestRunnerGenerator
     end
     output.puts('#include <setjmp.h>')
     output.puts('#include <stdio.h>')
-    output.puts('#include "CException.h"') if @options[:cexception]
+    output.puts('#include "CException.h"') if @options[:plugins].include?(:cexception)
     mocks.each do |mock|
       output.puts("#include \"#{mock.gsub('.h','')}.h\"")
     end
     output.puts('')    
     output.puts('char MessageBuffer[50];')
-    if @options[:order]
+    if @options[:enforce_strict_ordering]
       output.puts('int GlobalExpectCount;') 
       output.puts('int GlobalVerifyOrder;') 
       output.puts('char* GlobalOrderError;') 
@@ -156,7 +150,7 @@ class UnityTestRunnerGenerator
     unless (mocks.empty?)
       output.puts("static void CMock_Init(void)")
       output.puts("{")
-      if @options[:order]
+      if @options[:enforce_strict_ordering]
         output.puts("  GlobalExpectCount = 0;")
         output.puts("  GlobalVerifyOrder = 0;") 
         output.puts("  GlobalOrderError = NULL;") 
@@ -198,17 +192,18 @@ class UnityTestRunnerGenerator
   end
   
   def create_runtest(output, used_mocks)
+    cexception = @options[:plugins].include? :cexception
     output.puts("static void runTest(UnityTestFunction test)")
     output.puts("{")
     output.puts("  if (TEST_PROTECT())")
     output.puts("  {")
-    output.puts("    CEXCEPTION_T e;") if @options[:cexception]
-    output.puts("    Try {") if @options[:cexception]
+    output.puts("    CEXCEPTION_T e;") if cexception
+    output.puts("    Try {") if cexception
     output.puts("      CMock_Init();") unless (used_mocks.empty?) 
     output.puts("      setUp();")
     output.puts("      test();")
     output.puts("      CMock_Verify();") unless (used_mocks.empty?)
-    output.puts("    } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, \"Unhandled Exception!\"); }") if @options[:cexception]
+    output.puts("    } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, \"Unhandled Exception!\"); }") if cexception
     output.puts("  }")
     output.puts("  CMock_Destroy();") unless (used_mocks.empty?)
     output.puts("  if (TEST_PROTECT() && !TEST_IS_IGNORED)")
@@ -250,30 +245,23 @@ end
 
 
 if ($0 == __FILE__)
-  usage = ["usage: ruby #{__FILE__} (yaml) (options) input_test_file output_test_runner (includes)",
-           "  blah.yml    - will use config options in the yml file (see CMock docs)",
-           "  -cexception - include cexception support",
-           "  -order      - include cmock order-enforcement support" ]
-
   options = { :includes => [] }
   yaml_file = nil
   
   #parse out all the options first
   ARGV.reject! do |arg| 
-    if (arg =~ /\-(\w+)/) 
-      options[$1.to_sym] = 1
-      true
-    elsif (arg =~ /(\w+\.yml)/)
-      options = UnityTestRunnerGenerator.grab_config(arg)
-      true
-    else
-      false
+    case(arg)
+      when '-cexception': options[:plugins] = [:cexception]; true
+      when /\w+\.yml/:    options = UnityTestRunnerGenerator.grab_config(arg); true
+      else false
     end
   end     
            
   #make sure there is at least one parameter left (the input file)
   if !ARGV[0]
-    puts usage
+    puts ["usage: ruby #{__FILE__} (yaml) (options) input_test_file output_test_runner (includes)",
+           "  blah.yml    - will use config options in the yml file (see CMock docs)",
+           "  -cexception - include cexception support"].join("\n")
     exit 1
   end
   
diff --git a/rakefile.rb b/rakefile.rb
index 5b96525..ba8969e 100644
--- a/rakefile.rb
+++ b/rakefile.rb
@@ -22,6 +22,11 @@ task :unit do
   run_tests get_unit_test_files
 end
 
+Rake::TestTask.new(:scripts) do |t|
+  t.pattern = 'test/test_*.rb'
+  t.verbose = true
+end
+
 desc "Generate test summary"
 task :summary do
   report_summary
diff --git a/rakefile_helper.rb b/rakefile_helper.rb
index 66f5088..bba32dd 100644
--- a/rakefile_helper.rb
+++ b/rakefile_helper.rb
@@ -236,5 +236,4 @@ module RakefileHelpers
       
     end
   end
-  
 end
diff --git a/test/expectdata/testsample_cmd.c b/test/expectdata/testsample_cmd.c
new file mode 100644
index 0000000..c8da747
--- /dev/null
+++ b/test/expectdata/testsample_cmd.c
@@ -0,0 +1,47 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+#include "unity.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "CException.h"
+
+char MessageBuffer[50];
+
+extern void setUp(void);
+extern void tearDown(void);
+
+extern void test_TheFirstThingToTest(void);
+extern void test_TheSecondThingToTest(void);
+
+static void runTest(UnityTestFunction test)
+{
+  if (TEST_PROTECT())
+  {
+    CEXCEPTION_T e;
+    Try {
+      setUp();
+      test();
+    } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); }
+  }
+  if (TEST_PROTECT() && !TEST_IS_IGNORED)
+  {
+    tearDown();
+  }
+}
+void resetTest()
+{
+  tearDown();
+  setUp();
+}
+
+
+int main(void)
+{
+  Unity.TestFile = "test/testdata/testsample.c";
+  UnityBegin();
+
+  // RUN_TEST calls runTest
+  RUN_TEST(test_TheFirstThingToTest, 21);
+  RUN_TEST(test_TheSecondThingToTest, 43);
+
+  return (UnityEnd());
+}
diff --git a/test/expectdata/testsample_def.c b/test/expectdata/testsample_def.c
new file mode 100644
index 0000000..de46feb
--- /dev/null
+++ b/test/expectdata/testsample_def.c
@@ -0,0 +1,43 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+#include "unity.h"
+#include <setjmp.h>
+#include <stdio.h>
+
+char MessageBuffer[50];
+
+extern void setUp(void);
+extern void tearDown(void);
+
+extern void test_TheFirstThingToTest(void);
+extern void test_TheSecondThingToTest(void);
+
+static void runTest(UnityTestFunction test)
+{
+  if (TEST_PROTECT())
+  {
+      setUp();
+      test();
+  }
+  if (TEST_PROTECT() && !TEST_IS_IGNORED)
+  {
+    tearDown();
+  }
+}
+void resetTest()
+{
+  tearDown();
+  setUp();
+}
+
+
+int main(void)
+{
+  Unity.TestFile = "test/testdata/testsample.c";
+  UnityBegin();
+
+  // RUN_TEST calls runTest
+  RUN_TEST(test_TheFirstThingToTest, 21);
+  RUN_TEST(test_TheSecondThingToTest, 43);
+
+  return (UnityEnd());
+}
diff --git a/test/expectdata/testsample_mock_cmd.c b/test/expectdata/testsample_mock_cmd.c
new file mode 100644
index 0000000..125ccbb
--- /dev/null
+++ b/test/expectdata/testsample_mock_cmd.c
@@ -0,0 +1,67 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+#include "unity.h"
+#include "cmock.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "CException.h"
+#include "Mockstanky.h"
+
+char MessageBuffer[50];
+
+extern void setUp(void);
+extern void tearDown(void);
+
+extern void test_TheFirstThingToTest(void);
+extern void test_TheSecondThingToTest(void);
+
+static void CMock_Init(void)
+{
+  Mockstanky_Init();
+}
+static void CMock_Verify(void)
+{
+  Mockstanky_Verify();
+}
+static void CMock_Destroy(void)
+{
+  Mockstanky_Destroy();
+}
+static void runTest(UnityTestFunction test)
+{
+  if (TEST_PROTECT())
+  {
+    CEXCEPTION_T e;
+    Try {
+      CMock_Init();
+      setUp();
+      test();
+      CMock_Verify();
+    } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); }
+  }
+  CMock_Destroy();
+  if (TEST_PROTECT() && !TEST_IS_IGNORED)
+  {
+    tearDown();
+  }
+}
+void resetTest()
+{
+  CMock_Verify();
+  CMock_Destroy();
+  tearDown();
+  CMock_Init();
+  setUp();
+}
+
+
+int main(void)
+{
+  Unity.TestFile = "test/testdata/mocksample.c";
+  UnityBegin();
+
+  // RUN_TEST calls runTest
+  RUN_TEST(test_TheFirstThingToTest, 21);
+  RUN_TEST(test_TheSecondThingToTest, 43);
+
+  return (UnityEnd());
+}
diff --git a/test/expectdata/testsample_mock_def.c b/test/expectdata/testsample_mock_def.c
new file mode 100644
index 0000000..9b60a48
--- /dev/null
+++ b/test/expectdata/testsample_mock_def.c
@@ -0,0 +1,63 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+#include "unity.h"
+#include "cmock.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "Mockstanky.h"
+
+char MessageBuffer[50];
+
+extern void setUp(void);
+extern void tearDown(void);
+
+extern void test_TheFirstThingToTest(void);
+extern void test_TheSecondThingToTest(void);
+
+static void CMock_Init(void)
+{
+  Mockstanky_Init();
+}
+static void CMock_Verify(void)
+{
+  Mockstanky_Verify();
+}
+static void CMock_Destroy(void)
+{
+  Mockstanky_Destroy();
+}
+static void runTest(UnityTestFunction test)
+{
+  if (TEST_PROTECT())
+  {
+      CMock_Init();
+      setUp();
+      test();
+      CMock_Verify();
+  }
+  CMock_Destroy();
+  if (TEST_PROTECT() && !TEST_IS_IGNORED)
+  {
+    tearDown();
+  }
+}
+void resetTest()
+{
+  CMock_Verify();
+  CMock_Destroy();
+  tearDown();
+  CMock_Init();
+  setUp();
+}
+
+
+int main(void)
+{
+  Unity.TestFile = "test/testdata/mocksample.c";
+  UnityBegin();
+
+  // RUN_TEST calls runTest
+  RUN_TEST(test_TheFirstThingToTest, 21);
+  RUN_TEST(test_TheSecondThingToTest, 43);
+
+  return (UnityEnd());
+}
diff --git a/test/expectdata/testsample_mock_new1.c b/test/expectdata/testsample_mock_new1.c
new file mode 100644
index 0000000..415da59
--- /dev/null
+++ b/test/expectdata/testsample_mock_new1.c
@@ -0,0 +1,75 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+#include "unity.h"
+#include "cmock.h"
+#include "one.h"
+#include "two.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "CException.h"
+#include "Mockstanky.h"
+
+char MessageBuffer[50];
+int GlobalExpectCount;
+int GlobalVerifyOrder;
+char* GlobalOrderError;
+
+extern void setUp(void);
+extern void tearDown(void);
+
+extern void test_TheFirstThingToTest(void);
+extern void test_TheSecondThingToTest(void);
+
+static void CMock_Init(void)
+{
+  GlobalExpectCount = 0;
+  GlobalVerifyOrder = 0;
+  GlobalOrderError = NULL;
+  Mockstanky_Init();
+}
+static void CMock_Verify(void)
+{
+  Mockstanky_Verify();
+}
+static void CMock_Destroy(void)
+{
+  Mockstanky_Destroy();
+}
+static void runTest(UnityTestFunction test)
+{
+  if (TEST_PROTECT())
+  {
+    CEXCEPTION_T e;
+    Try {
+      CMock_Init();
+      setUp();
+      test();
+      CMock_Verify();
+    } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); }
+  }
+  CMock_Destroy();
+  if (TEST_PROTECT() && !TEST_IS_IGNORED)
+  {
+    tearDown();
+  }
+}
+void resetTest()
+{
+  CMock_Verify();
+  CMock_Destroy();
+  tearDown();
+  CMock_Init();
+  setUp();
+}
+
+
+int main(void)
+{
+  Unity.TestFile = "test/testdata/mocksample.c";
+  UnityBegin();
+
+  // RUN_TEST calls runTest
+  RUN_TEST(test_TheFirstThingToTest, 21);
+  RUN_TEST(test_TheSecondThingToTest, 43);
+
+  return (UnityEnd());
+}
diff --git a/test/expectdata/testsample_mock_new2.c b/test/expectdata/testsample_mock_new2.c
new file mode 100644
index 0000000..0822ade
--- /dev/null
+++ b/test/expectdata/testsample_mock_new2.c
@@ -0,0 +1,72 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+#include "unity.h"
+#include "cmock.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "Mockstanky.h"
+
+char MessageBuffer[50];
+
+extern void setUp(void);
+extern void tearDown(void);
+
+extern void test_TheFirstThingToTest(void);
+extern void test_TheSecondThingToTest(void);
+
+static void CMock_Init(void)
+{
+  Mockstanky_Init();
+}
+static void CMock_Verify(void)
+{
+  Mockstanky_Verify();
+}
+static void CMock_Destroy(void)
+{
+  Mockstanky_Destroy();
+}
+static int suite_setup(void)
+{
+a_custom_setup();
+}
+static int suite_teardown(int num_failures)
+{
+a_custom_teardown();
+}
+static void runTest(UnityTestFunction test)
+{
+  if (TEST_PROTECT())
+  {
+      CMock_Init();
+      setUp();
+      test();
+      CMock_Verify();
+  }
+  CMock_Destroy();
+  if (TEST_PROTECT() && !TEST_IS_IGNORED)
+  {
+    tearDown();
+  }
+}
+void resetTest()
+{
+  CMock_Verify();
+  CMock_Destroy();
+  tearDown();
+  CMock_Init();
+  setUp();
+}
+
+
+int main(void)
+{
+  suite_setup();
+  Unity.TestFile = "test/testdata/mocksample.c";
+  UnityBegin();
+
+  // RUN_TEST calls runTest
+  RUN_TEST(test_TheFirstThingToTest, 21);
+  RUN_TEST(test_TheSecondThingToTest, 43);
+
+  return suite_teardown(UnityEnd());
+}
diff --git a/test/expectdata/testsample_mock_run1.c b/test/expectdata/testsample_mock_run1.c
new file mode 100644
index 0000000..415da59
--- /dev/null
+++ b/test/expectdata/testsample_mock_run1.c
@@ -0,0 +1,75 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+#include "unity.h"
+#include "cmock.h"
+#include "one.h"
+#include "two.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "CException.h"
+#include "Mockstanky.h"
+
+char MessageBuffer[50];
+int GlobalExpectCount;
+int GlobalVerifyOrder;
+char* GlobalOrderError;
+
+extern void setUp(void);
+extern void tearDown(void);
+
+extern void test_TheFirstThingToTest(void);
+extern void test_TheSecondThingToTest(void);
+
+static void CMock_Init(void)
+{
+  GlobalExpectCount = 0;
+  GlobalVerifyOrder = 0;
+  GlobalOrderError = NULL;
+  Mockstanky_Init();
+}
+static void CMock_Verify(void)
+{
+  Mockstanky_Verify();
+}
+static void CMock_Destroy(void)
+{
+  Mockstanky_Destroy();
+}
+static void runTest(UnityTestFunction test)
+{
+  if (TEST_PROTECT())
+  {
+    CEXCEPTION_T e;
+    Try {
+      CMock_Init();
+      setUp();
+      test();
+      CMock_Verify();
+    } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); }
+  }
+  CMock_Destroy();
+  if (TEST_PROTECT() && !TEST_IS_IGNORED)
+  {
+    tearDown();
+  }
+}
+void resetTest()
+{
+  CMock_Verify();
+  CMock_Destroy();
+  tearDown();
+  CMock_Init();
+  setUp();
+}
+
+
+int main(void)
+{
+  Unity.TestFile = "test/testdata/mocksample.c";
+  UnityBegin();
+
+  // RUN_TEST calls runTest
+  RUN_TEST(test_TheFirstThingToTest, 21);
+  RUN_TEST(test_TheSecondThingToTest, 43);
+
+  return (UnityEnd());
+}
diff --git a/test/expectdata/testsample_mock_run2.c b/test/expectdata/testsample_mock_run2.c
new file mode 100644
index 0000000..0822ade
--- /dev/null
+++ b/test/expectdata/testsample_mock_run2.c
@@ -0,0 +1,72 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+#include "unity.h"
+#include "cmock.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "Mockstanky.h"
+
+char MessageBuffer[50];
+
+extern void setUp(void);
+extern void tearDown(void);
+
+extern void test_TheFirstThingToTest(void);
+extern void test_TheSecondThingToTest(void);
+
+static void CMock_Init(void)
+{
+  Mockstanky_Init();
+}
+static void CMock_Verify(void)
+{
+  Mockstanky_Verify();
+}
+static void CMock_Destroy(void)
+{
+  Mockstanky_Destroy();
+}
+static int suite_setup(void)
+{
+a_custom_setup();
+}
+static int suite_teardown(int num_failures)
+{
+a_custom_teardown();
+}
+static void runTest(UnityTestFunction test)
+{
+  if (TEST_PROTECT())
+  {
+      CMock_Init();
+      setUp();
+      test();
+      CMock_Verify();
+  }
+  CMock_Destroy();
+  if (TEST_PROTECT() && !TEST_IS_IGNORED)
+  {
+    tearDown();
+  }
+}
+void resetTest()
+{
+  CMock_Verify();
+  CMock_Destroy();
+  tearDown();
+  CMock_Init();
+  setUp();
+}
+
+
+int main(void)
+{
+  suite_setup();
+  Unity.TestFile = "test/testdata/mocksample.c";
+  UnityBegin();
+
+  // RUN_TEST calls runTest
+  RUN_TEST(test_TheFirstThingToTest, 21);
+  RUN_TEST(test_TheSecondThingToTest, 43);
+
+  return suite_teardown(UnityEnd());
+}
diff --git a/test/expectdata/testsample_mock_yaml.c b/test/expectdata/testsample_mock_yaml.c
new file mode 100644
index 0000000..30e7744
--- /dev/null
+++ b/test/expectdata/testsample_mock_yaml.c
@@ -0,0 +1,68 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+#include "unity.h"
+#include "cmock.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "Mockstanky.h"
+
+char MessageBuffer[50];
+
+extern void setUp(void);
+extern void tearDown(void);
+
+extern void test_TheFirstThingToTest(void);
+extern void test_TheSecondThingToTest(void);
+
+static void CMock_Init(void)
+{
+  Mockstanky_Init();
+}
+static void CMock_Verify(void)
+{
+  Mockstanky_Verify();
+}
+static void CMock_Destroy(void)
+{
+  Mockstanky_Destroy();
+}
+static int suite_setup(void)
+{
+a_yaml_setup();
+}
+static void runTest(UnityTestFunction test)
+{
+  if (TEST_PROTECT())
+  {
+      CMock_Init();
+      setUp();
+      test();
+      CMock_Verify();
+  }
+  CMock_Destroy();
+  if (TEST_PROTECT() && !TEST_IS_IGNORED)
+  {
+    tearDown();
+  }
+}
+void resetTest()
+{
+  CMock_Verify();
+  CMock_Destroy();
+  tearDown();
+  CMock_Init();
+  setUp();
+}
+
+
+int main(void)
+{
+  suite_setup();
+  Unity.TestFile = "test/testdata/mocksample.c";
+  UnityBegin();
+
+  // RUN_TEST calls runTest
+  RUN_TEST(test_TheFirstThingToTest, 21);
+  RUN_TEST(test_TheSecondThingToTest, 43);
+
+  return (UnityEnd());
+}
diff --git a/test/expectdata/testsample_new1.c b/test/expectdata/testsample_new1.c
new file mode 100644
index 0000000..3aa48c9
--- /dev/null
+++ b/test/expectdata/testsample_new1.c
@@ -0,0 +1,52 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+#include "unity.h"
+#include "one.h"
+#include "two.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "CException.h"
+
+char MessageBuffer[50];
+int GlobalExpectCount;
+int GlobalVerifyOrder;
+char* GlobalOrderError;
+
+extern void setUp(void);
+extern void tearDown(void);
+
+extern void test_TheFirstThingToTest(void);
+extern void test_TheSecondThingToTest(void);
+
+static void runTest(UnityTestFunction test)
+{
+  if (TEST_PROTECT())
+  {
+    CEXCEPTION_T e;
+    Try {
+      setUp();
+      test();
+    } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); }
+  }
+  if (TEST_PROTECT() && !TEST_IS_IGNORED)
+  {
+    tearDown();
+  }
+}
+void resetTest()
+{
+  tearDown();
+  setUp();
+}
+
+
+int main(void)
+{
+  Unity.TestFile = "test/testdata/testsample.c";
+  UnityBegin();
+
+  // RUN_TEST calls runTest
+  RUN_TEST(test_TheFirstThingToTest, 21);
+  RUN_TEST(test_TheSecondThingToTest, 43);
+
+  return (UnityEnd());
+}
diff --git a/test/expectdata/testsample_new2.c b/test/expectdata/testsample_new2.c
new file mode 100644
index 0000000..295bf88
--- /dev/null
+++ b/test/expectdata/testsample_new2.c
@@ -0,0 +1,52 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+#include "unity.h"
+#include <setjmp.h>
+#include <stdio.h>
+
+char MessageBuffer[50];
+
+extern void setUp(void);
+extern void tearDown(void);
+
+extern void test_TheFirstThingToTest(void);
+extern void test_TheSecondThingToTest(void);
+
+static int suite_setup(void)
+{
+a_custom_setup();
+}
+static int suite_teardown(int num_failures)
+{
+a_custom_teardown();
+}
+static void runTest(UnityTestFunction test)
+{
+  if (TEST_PROTECT())
+  {
+      setUp();
+      test();
+  }
+  if (TEST_PROTECT() && !TEST_IS_IGNORED)
+  {
+    tearDown();
+  }
+}
+void resetTest()
+{
+  tearDown();
+  setUp();
+}
+
+
+int main(void)
+{
+  suite_setup();
+  Unity.TestFile = "test/testdata/testsample.c";
+  UnityBegin();
+
+  // RUN_TEST calls runTest
+  RUN_TEST(test_TheFirstThingToTest, 21);
+  RUN_TEST(test_TheSecondThingToTest, 43);
+
+  return suite_teardown(UnityEnd());
+}
diff --git a/test/expectdata/testsample_run1.c b/test/expectdata/testsample_run1.c
new file mode 100644
index 0000000..3aa48c9
--- /dev/null
+++ b/test/expectdata/testsample_run1.c
@@ -0,0 +1,52 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+#include "unity.h"
+#include "one.h"
+#include "two.h"
+#include <setjmp.h>
+#include <stdio.h>
+#include "CException.h"
+
+char MessageBuffer[50];
+int GlobalExpectCount;
+int GlobalVerifyOrder;
+char* GlobalOrderError;
+
+extern void setUp(void);
+extern void tearDown(void);
+
+extern void test_TheFirstThingToTest(void);
+extern void test_TheSecondThingToTest(void);
+
+static void runTest(UnityTestFunction test)
+{
+  if (TEST_PROTECT())
+  {
+    CEXCEPTION_T e;
+    Try {
+      setUp();
+      test();
+    } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); }
+  }
+  if (TEST_PROTECT() && !TEST_IS_IGNORED)
+  {
+    tearDown();
+  }
+}
+void resetTest()
+{
+  tearDown();
+  setUp();
+}
+
+
+int main(void)
+{
+  Unity.TestFile = "test/testdata/testsample.c";
+  UnityBegin();
+
+  // RUN_TEST calls runTest
+  RUN_TEST(test_TheFirstThingToTest, 21);
+  RUN_TEST(test_TheSecondThingToTest, 43);
+
+  return (UnityEnd());
+}
diff --git a/test/expectdata/testsample_run2.c b/test/expectdata/testsample_run2.c
new file mode 100644
index 0000000..295bf88
--- /dev/null
+++ b/test/expectdata/testsample_run2.c
@@ -0,0 +1,52 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+#include "unity.h"
+#include <setjmp.h>
+#include <stdio.h>
+
+char MessageBuffer[50];
+
+extern void setUp(void);
+extern void tearDown(void);
+
+extern void test_TheFirstThingToTest(void);
+extern void test_TheSecondThingToTest(void);
+
+static int suite_setup(void)
+{
+a_custom_setup();
+}
+static int suite_teardown(int num_failures)
+{
+a_custom_teardown();
+}
+static void runTest(UnityTestFunction test)
+{
+  if (TEST_PROTECT())
+  {
+      setUp();
+      test();
+  }
+  if (TEST_PROTECT() && !TEST_IS_IGNORED)
+  {
+    tearDown();
+  }
+}
+void resetTest()
+{
+  tearDown();
+  setUp();
+}
+
+
+int main(void)
+{
+  suite_setup();
+  Unity.TestFile = "test/testdata/testsample.c";
+  UnityBegin();
+
+  // RUN_TEST calls runTest
+  RUN_TEST(test_TheFirstThingToTest, 21);
+  RUN_TEST(test_TheSecondThingToTest, 43);
+
+  return suite_teardown(UnityEnd());
+}
diff --git a/test/expectdata/testsample_yaml.c b/test/expectdata/testsample_yaml.c
new file mode 100644
index 0000000..76d5c94
--- /dev/null
+++ b/test/expectdata/testsample_yaml.c
@@ -0,0 +1,48 @@
+/* AUTOGENERATED FILE. DO NOT EDIT. */
+#include "unity.h"
+#include <setjmp.h>
+#include <stdio.h>
+
+char MessageBuffer[50];
+
+extern void setUp(void);
+extern void tearDown(void);
+
+extern void test_TheFirstThingToTest(void);
+extern void test_TheSecondThingToTest(void);
+
+static int suite_setup(void)
+{
+a_yaml_setup();
+}
+static void runTest(UnityTestFunction test)
+{
+  if (TEST_PROTECT())
+  {
+      setUp();
+      test();
+  }
+  if (TEST_PROTECT() && !TEST_IS_IGNORED)
+  {
+    tearDown();
+  }
+}
+void resetTest()
+{
+  tearDown();
+  setUp();
+}
+
+
+int main(void)
+{
+  suite_setup();
+  Unity.TestFile = "test/testdata/testsample.c";
+  UnityBegin();
+
+  // RUN_TEST calls runTest
+  RUN_TEST(test_TheFirstThingToTest, 21);
+  RUN_TEST(test_TheSecondThingToTest, 43);
+
+  return (UnityEnd());
+}
diff --git a/test/test_generate_test_runner.rb b/test/test_generate_test_runner.rb
new file mode 100644
index 0000000..71ac589
--- /dev/null
+++ b/test/test_generate_test_runner.rb
@@ -0,0 +1,82 @@
+# ==========================================
+#   CMock Project - Automatic Mock Generation for C
+#   Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
+#   [Released under MIT License. Please refer to license.txt for details]
+# ========================================== 
+
+ruby_version = RUBY_VERSION.split('.')
+if (ruby_version[1].to_i == 9) and (ruby_version[2].to_i > 1)
+  require 'gems'
+  gem 'test-unit'
+end
+require 'test/unit'
+require 'auto/generate_test_runner.rb'
+
+TEST_FILE = 'test/testdata/testsample.c'
+TEST_MOCK = 'test/testdata/mocksample.c'
+OUT_FILE  = 'build/testsample_'
+EXP_FILE  = 'test/expectdata/testsample_'
+
+class TestGenerateTestRunner < Test::Unit::TestCase
+  def setup
+  end
+
+  def teardown
+  end
+  
+  def verify_output_equal(subtest)
+    expected = File.read(EXP_FILE + subtest + '.c').gsub(/\r\n/,"\n")
+    actual   = File.read(OUT_FILE + subtest + '.c').gsub(/\r\n/,"\n")
+    assert_equal(expected, actual, "Generated File Sub-Test '#{subtest}' Failed")
+  end
+  
+  def test_ShouldGenerateARunnerByCreatingRunnerWithOptions
+    sets = { 'def'  => nil,
+             'new1' => { :plugins => [:cexception], :includes => ['one.h', 'two.h'], :enforce_strict_ordering => true },
+             'new2' => { :plugins => [:ignore], :suite_setup => "a_custom_setup();", :suite_teardown => "a_custom_teardown();" }   
+    }
+    
+    sets.each_pair do |subtest, options|
+      UnityTestRunnerGenerator.new(options).run(TEST_FILE, OUT_FILE + subtest + '.c')
+      verify_output_equal(subtest)
+      UnityTestRunnerGenerator.new(options).run(TEST_MOCK, OUT_FILE + 'mock_' + subtest + '.c')
+      verify_output_equal('mock_' + subtest)
+    end
+  end
+  
+  def test_ShouldGenerateARunnerByRunningRunnerWithOptions
+    sets = { 'run1' => { :plugins => [:cexception], :includes => ['one.h', 'two.h'], :enforce_strict_ordering => true },
+             'run2' => { :plugins => [:ignore], :suite_setup => "a_custom_setup();", :suite_teardown => "a_custom_teardown();" }   
+    }
+    
+    sets.each_pair do |subtest, options|
+      UnityTestRunnerGenerator.new.run(TEST_FILE, OUT_FILE + subtest + '.c', options)
+      verify_output_equal(subtest)
+      UnityTestRunnerGenerator.new.run(TEST_MOCK, OUT_FILE + 'mock_' + subtest + '.c', options)
+      verify_output_equal('mock_' + subtest)
+    end
+  end
+  
+  def test_ShouldGenerateARunnerByPullingYamlOptions
+    subtest = 'yaml'
+    cmdstr = "ruby auto/generate_test_runner.rb test/testdata/sample.yml \"#{TEST_FILE}\" \"#{OUT_FILE + subtest + '.c'}\""
+    `#{cmdstr}`
+    verify_output_equal(subtest)
+    
+    cmdstr = "ruby auto/generate_test_runner.rb test/testdata/sample.yml \"#{TEST_MOCK}\" \"#{OUT_FILE + 'mock_' + subtest + '.c'}\""
+    `#{cmdstr}`
+    verify_output_equal('mock_' + subtest)
+  end
+  
+  def test_ShouldGenerateARunnerByPullingCommandlineOptions
+    subtest = 'cmd'
+    cmdstr = "ruby auto/generate_test_runner.rb -cexception \"#{TEST_FILE}\" \"#{OUT_FILE + subtest + '.c'}\""
+    `#{cmdstr}`
+    verify_output_equal(subtest)
+    
+    cmdstr = "ruby auto/generate_test_runner.rb -cexception \"#{TEST_MOCK}\" \"#{OUT_FILE + 'mock_' + subtest + '.c'}\""
+    `#{cmdstr}`
+    verify_output_equal('mock_' + subtest)
+  end
+  
+end
diff --git a/test/testdata/mocksample.c b/test/testdata/mocksample.c
new file mode 100644
index 0000000..847d87f
--- /dev/null
+++ b/test/testdata/mocksample.c
@@ -0,0 +1,51 @@
+// This is just a sample test file to be used to test the generator script
+#ifndef TEST_SAMPLE_H
+#define TEST_SAMPLE_H
+
+#include <setjmp.h>
+#include "unity.h"
+#include "funky.h"
+#include "Mockstanky.h"
+
+void setUp(void)
+{
+  CustomSetupStuff();
+}
+
+void tearDown(void)
+{
+  CustomTeardownStuff
+}
+
+//Yup, nice comment
+void test_TheFirstThingToTest(void)
+{
+    TEST_ASSERT(1);
+
+    TEST_ASSERT_TRUE(1);
+}
+
+/*
+void test_ShouldBeIgnored(void)
+{
+    DoesStuff();
+}
+*/
+
+//void test_ShouldAlsoNotBeTested(void)
+//{
+//    Call_An_Expect();
+//    
+//    CallAFunction();
+//    test_CallAFunctionThatLooksLikeATest();
+//}
+
+void test_TheSecondThingToTest(void)
+{
+    Call_An_Expect();
+    
+    CallAFunction();
+    test_CallAFunctionThatLooksLikeATest();
+}
+
+#endif //TEST_SAMPLE_H
diff --git a/test/testdata/sample.yml b/test/testdata/sample.yml
new file mode 100644
index 0000000..567972d
--- /dev/null
+++ b/test/testdata/sample.yml
@@ -0,0 +1,8 @@
+:unity:
+  :includes
+    - two.h
+    - three.h
+  :plugins:
+    - :cexception
+  :suite_setup: |
+    a_yaml_setup();
\ No newline at end of file
diff --git a/test/testdata/testsample.c b/test/testdata/testsample.c
new file mode 100644
index 0000000..e5a2b18
--- /dev/null
+++ b/test/testdata/testsample.c
@@ -0,0 +1,51 @@
+// This is just a sample test file to be used to test the generator script
+#ifndef TEST_SAMPLE_H
+#define TEST_SAMPLE_H
+
+#include <setjmp.h>
+#include "unity.h"
+#include "funky.h"
+#include "stanky.h"
+
+void setUp(void)
+{
+  CustomSetupStuff();
+}
+
+void tearDown(void)
+{
+  CustomTeardownStuff
+}
+
+//Yup, nice comment
+void test_TheFirstThingToTest(void)
+{
+    TEST_ASSERT(1);
+
+    TEST_ASSERT_TRUE(1);
+}
+
+/*
+void test_ShouldBeIgnored(void)
+{
+    DoesStuff();
+}
+*/
+
+//void test_ShouldAlsoNotBeTested(void)
+//{
+//    Call_An_Expect();
+//    
+//    CallAFunction();
+//    test_CallAFunctionThatLooksLikeATest();
+//}
+
+void test_TheSecondThingToTest(void)
+{
+    Call_An_Expect();
+    
+    CallAFunction();
+    test_CallAFunctionThatLooksLikeATest();
+}
+
+#endif //TEST_SAMPLE_H