def cookbook_that_matches_rules(codes)
      recipe = ""
      codes.each do |code|
        if code == "FC002"
          recipe += %q{
            directory "#{node['base_dir']}" do
              action :create
            end
          }
        elsif code == "FC004"
          recipe += %q{
            execute "stop-jetty" do
              command "/etc/init.d/jetty6 stop"
              action :run
            end
          }
        elsif code == "FC005"
          recipe += %q{
            package 'erlang-base' do
              action :upgrade
            end
            package 'erlang-corba' do
              action :upgrade
            end
            package 'erlang-another' do
              action :upgrade
            end
          }
        elsif code == "FC006"
          recipe += %q{
            directory "/var/lib/foo" do
              mode 644
              action :create
            end
          }
        end
      end
      write_recipe(recipe)
      write_file("cookbooks/example/recipes/server.rb", "")
      write_readme("Hello World") # Don't trigger FC011
      write_metadata(%q{
        name 'example'
        maintainer 'A Maintainer'
        maintainer_email 'maintainer@example.com'
        version '0.0.1'
        issues_url 'http://github.com/foo/bar_cookbook/issues'
        source_url 'http://github.com/foo/bar_cookbook'
      }.strip)
    end
def cookbook_that_matches_rules(codes)
      recipe = ""
      codes.each do |code|
        if code == "FC002"
          recipe += %q{
            directory "#{node['base_dir']}" do
              action :create
            end
          }
        elsif code == "FC004"
          recipe += %q{
            execute "stop-jetty" do
              command "/etc/init.d/jetty6 stop"
              action :run
            end
          }
        elsif code == "FC005"
          recipe += %q{
            package 'erlang-base' do
              action :upgrade
            end
            package 'erlang-corba' do
              action :upgrade
            end
            package 'erlang-another' do
              action :upgrade
            end
          }
        elsif code == "FC006"
          recipe += %q{
            directory "/var/lib/foo" do
              mode 644
              action :create
            end
          }
        end
      end
      write_recipe(recipe)
      write_file("cookbooks/example/recipes/server.rb", "")
      write_readme("Hello World") # Don't trigger FC011
      write_metadata(%q{
        name 'example'
        maintainer 'A Maintainer'
        maintainer_email 'maintainer@example.com'
        version '0.0.1'
        issues_url 'http://github.com/foo/bar_cookbook/issues'
        source_url 'http://github.com/foo/bar_cookbook'
      }.strip)
    end
Create a cookbook that will match the specified rules.

 @param [Array] codes The codes to match. Only FC002, FC004 and FC005 and FC006 are supported.