diff --git a/docs/CMock Summary.odt b/docs/CMock Summary.odt index 1071061..a567741 100644 Binary files a/docs/CMock Summary.odt and b/docs/CMock Summary.odt differ diff --git a/docs/CMock Summary.pdf b/docs/CMock Summary.pdf index 55faaeb..fc8c562 100644 Binary files a/docs/CMock Summary.pdf and b/docs/CMock Summary.pdf differ diff --git a/lib/cmock_config.rb b/lib/cmock_config.rb index 1d35476..06b103b 100644 --- a/lib/cmock_config.rb +++ b/lib/cmock_config.rb @@ -8,6 +8,7 @@ class CMockConfig CMockDefaultOptions = { + :framework => :unity, :mock_path => 'mocks', :mock_prefix => 'Mock', :plugins => [], diff --git a/lib/cmock_generator.rb b/lib/cmock_generator.rb index 4cf9339..109ebd5 100644 --- a/lib/cmock_generator.rb +++ b/lib/cmock_generator.rb @@ -17,6 +17,7 @@ class CMockGenerator @config = config @prefix = @config.mock_prefix @ordered = @config.enforce_strict_ordering + @framework = @config.framework.to_s end def create_mock(module_name, parsed_stuff) @@ -86,7 +87,7 @@ class CMockGenerator file << "#include \n" file << "#include \n" file << "#include \n" - file << "#include \"unity.h\"\n" + file << "#include \"#{@framework}.h\"\n" file << "#include \"cmock.h\"\n" file << @plugins.run(:include_files) includes = @config.includes diff --git a/rakefile_helper.rb b/rakefile_helper.rb index cdb59c8..679373c 100644 --- a/rakefile_helper.rb +++ b/rakefile_helper.rb @@ -172,6 +172,7 @@ module RakefileHelpers results = Dir[results_glob] summary.set_targets(results) summary.run + raise "There were failures" if (summary.failures > 0) end def run_system_test_interactions(test_case_files) diff --git a/test/unit/cmock_generator_main_test.rb b/test/unit/cmock_generator_main_test.rb index b9492a5..9518506 100644 --- a/test/unit/cmock_generator_main_test.rb +++ b/test/unit/cmock_generator_main_test.rb @@ -43,6 +43,7 @@ class CMockGeneratorTest < Test::Unit::TestCase #no strict handling @config.expect.mock_prefix.returns("Mock") @config.expect.enforce_strict_ordering.returns(false) + @config.expect.framework.returns(:unity) @cmock_generator = CMockGenerator.new(@config, @file_writer, @utils, @plugins) @cmock_generator.module_name = @module_name @cmock_generator.mock_name = "Mock#{@module_name}" @@ -50,6 +51,7 @@ class CMockGeneratorTest < Test::Unit::TestCase #strict handling @config.expect.mock_prefix.returns("Mock") @config.expect.enforce_strict_ordering.returns(true) + @config.expect.framework.returns(:unity) @cmock_generator_strict = CMockGenerator.new(@config, @file_writer, @utils, @plugins) @cmock_generator_strict.module_name = @module_name @cmock_generator_strict.mock_name = "Mock#{@module_name}"