ChefDslHelper { public static boolean hasChefAttributeInString(String rubyString) { boolean hasAttribute = false; if (rubyString.contains("#{")) { hasAttribute = true; } return hasAttribute; }  static boolean hasChefAttributeInString(String rubyString); static String resolveRubyStringWithAttributes(ChefCookbookConfiguration cookbookConfiguration, String rubyString); static String[] resolveRecipeCall(String recipeCall); static String resolveRubyStringWithCode(CookbookParseResult parseResult, String rubyString);  }
@Test public void hasChefAttributeInString() { String rubyStringWithAttribute = "This is a normal String#{node['test']['attribute']} with an attribute"; assertTrue(ChefDslHelper.hasChefAttributeInString(rubyStringWithAttribute)); }