diff --git a/test/Rakefile b/test/Rakefile
index 6f04d33f..60625cff 100644
--- a/test/Rakefile
+++ b/test/Rakefile
@@ -26,7 +26,9 @@ run_or_die 'xcodebuild -project ../mogenerator.xcodeproj -scheme mogenerator cle
run_or_die 'xcodebuild -project ../mogenerator.xcodeproj -scheme mogenerator'
def gen_and_compile_objc(mogenPath, extra_mogen_args, extra_llvm_args)
- puts "*** Testing Objective-C"
+ status = '*** Testing Objective-C'
+ status << ' with parameters' if extra_mogen_args.length > 0
+ puts status
ENV['MOMC_NO_INVERSE_RELATIONSHIP_WARNINGS'] = '1'
run_or_die "#{mogenPath.gsub(/ /, '\\ ')} --model test.xcdatamodel --output MOs --baseClass MyBaseClass #{extra_mogen_args}"
run_or_die 'cp ./objc/Gender.* ./objc/MyBaseClass.* MOs'
@@ -60,6 +62,16 @@ task :swift do
Rake::Task[:clean].execute
end
+desc 'Generate, Compile and Run with parameters'
+task :objc do
+ Rake::Task[:clean].execute
+ gen_and_compile_objc(MOGENERATOR_PATH, '--ignored-entities Uncle,Aunt', '')
+ includes_uncle = Dir.entries('./MOs').any? do |file|
+ file.include?('Uncle') || file.include?('Aunt')
+ end
+ raise 'Failed: Ignored entities should not be generated' if includes_uncle
+ Rake::Task[:clean].execute
+end
desc 'Clean output'
task :clean do
diff --git a/test/test.xcdatamodel/contents b/test/test.xcdatamodel/contents
index 54105d88..a62d35c2 100644
--- a/test/test.xcdatamodel/contents
+++ b/test/test.xcdatamodel/contents
@@ -55,6 +55,9 @@
+
+
+
@@ -69,5 +72,6 @@
+
\ No newline at end of file