<commit_before><commit_msg>Add chef-spec for backup recipe<commit_after>require_relative '../spec_helper'

describe 'backup_restore::backup' do
  let(:chef_run) do
    runner = ChefSpec::Runner.new(
      cookbook_path: %w(site-cookbooks cookbooks),
      platform:      'centos',
      version:       '6.5'
    )do |node|
      node.set['backup_restore']['sources']['enabled'] =
       %w(directory mysql ruby)
    end

    runner.converge(described_recipe)
  end

  it 'run directory backup' do
    expect(chef_run).to include_recipe('backup_restore::backup_directory')
  end

  it 'run mysql backup' do
    expect(chef_run).to include_recipe('backup_restore::backup_mysql')
  end

  it 'run ruby backup' do
    expect(chef_run).to include_recipe('backup_restore::backup_ruby')
  end
end
{'fraction_non_alphanumeric': 0.11913814955640051, 'fraction_numerical': 0.0025348542458808617, 'mean_word_length': 3.9685534591194966, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6269127', 'n_tokens_mistral': 265, 'n_tokens_neox': 254, 'n_words': 54}