Module: MiniTest::Chef::Infections
- Extended by:
- Chef::Mixin::ConvertToClassName
- Defined in:
- lib/minitest-chef-handler/infections.rb
Class Method Summary collapse
Class Method Details
.infect_resource(resource, meth, new_name) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/minitest-chef-handler/infections.rb', line 7 def self.infect_resource(resource, meth, new_name) clazz = ::Chef::Resource.const_get(convert_to_class_name(resource.to_s)) clazz.infect_an_assertion "assert_#{meth}".to_sym, "must_#{new_name}".to_sym, :only_one_argument clazz.infect_an_assertion "refute_#{meth}".to_sym, "wont_#{new_name}".to_sym, :only_one_argument end |