| 1 | require "#{ENV['CMOCK_DIR']}/lib/cmock" |
| 2 | |
| 3 | raise 'Header file to mock must be specified!' unless ARGV.length >= 1 |
| 4 | |
| 5 | mock_out = ENV.fetch('MOCK_OUT', './build/test/mocks') |
| 6 | mock_prefix = ENV.fetch('MOCK_PREFIX', 'mock_') |
| 7 | cmock = CMock.new(:plugins => %i[ignore return_thru_ptr], :mock_prefix => mock_prefix, :mock_path => mock_out) |
| 8 | cmock.setup_mocks(ARGV[0]) |