mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 00:15:58 +01:00
Module generator finishes for partially existing files
This resolves #219. When generating a new module, if all the files to generate already exist then it fails as before. If some of the files already exist, then the files that need to be created are created. Any existing files are not changed. Also added a bunch of tests for this feature via rspec. Run them from the test folder with `rake spec`.
This commit is contained in:
@@ -10,9 +10,11 @@ $verbose = false
|
||||
require 'rake'
|
||||
require 'rake/clean'
|
||||
require UNITY_ROOT + 'rakefile_helper'
|
||||
require 'rspec/core/rake_task'
|
||||
|
||||
TEMP_DIRS = [
|
||||
File.join(UNITY_ROOT, 'build')
|
||||
File.join(UNITY_ROOT, 'build'),
|
||||
File.join(UNITY_ROOT, 'sandbox')
|
||||
]
|
||||
|
||||
TEMP_DIRS.each do |dir|
|
||||
@@ -40,6 +42,11 @@ task :scripts => [:prepare_for_tests] do
|
||||
end
|
||||
end
|
||||
|
||||
desc "Run all rspecs"
|
||||
RSpec::Core::RakeTask.new(:spec) do |t|
|
||||
t.pattern = 'spec/**/*_spec.rb'
|
||||
end
|
||||
|
||||
desc "Generate test summary"
|
||||
task :summary do
|
||||
report_summary
|
||||
|
||||
Reference in New Issue
Block a user