- fixed the other place that had the same problem for 1.8.7's lack of define_singleton_method

This commit is contained in:
Mark VanderVoord
2014-12-18 16:45:12 -05:00
parent e6b3fc47d5
commit 33fc50084b
+7 -2
View File
@@ -20,8 +20,13 @@ describe CMockPluginManager, "Verify CMockPluginManager Module" do
:enforce_strict_ordering => false,
:ignore => :args_and_calls
)
@config.define_singleton_method( :plugins ){ @plugins || [] }
@config.define_singleton_method( :plugins= ){ |val| @plugins = val }
#if (RUBY_VERSION.split('.')[0].to_i >= 2)
# @config.define_singleton_method( :plugins ){ @plugins || [] }
# @config.define_singleton_method( :plugins= ){ |val| @plugins = val }
#else
eval "class << @config\ndef plugins\n@plugins||[]\nend\ndef plugins=(val)\n@plugins=val\nend\nend\n"
#end
end
after do