mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-29 19:24:27 +01:00
Add ability to inject correct mock prefix
This commit is contained in:
@@ -96,6 +96,7 @@ class UnityModuleGenerator
|
|||||||
:update_svn => false,
|
:update_svn => false,
|
||||||
:boilerplates => {},
|
:boilerplates => {},
|
||||||
:test_prefix => 'Test',
|
:test_prefix => 'Test',
|
||||||
|
:mock_prefix => 'Mock',
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -136,7 +137,7 @@ class UnityModuleGenerator
|
|||||||
:includes => case(triad[:inc])
|
:includes => case(triad[:inc])
|
||||||
when :src then @options[:includes][:src] | pattern_traits[:inc].map{|f| f % [module_name]}
|
when :src then @options[:includes][:src] | pattern_traits[:inc].map{|f| f % [module_name]}
|
||||||
when :inc then @options[:includes][:inc]
|
when :inc then @options[:includes][:inc]
|
||||||
when :tst then @options[:includes][:tst] | pattern_traits[:inc].map{|f| "Mock#{f}"% [module_name]}
|
when :tst then @options[:includes][:tst] | pattern_traits[:inc].map{|f| "#{@options[:mock_prefix]}#{f}"% [module_name]}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user