<commit_before>require 'spec_helper'

describe "#{File.basename(Dir.getwd)}::default" do
	let(:chef_run) {
		ChefSpec::ChefRunner.new(:evaluate_guards => true)
	}

	before(:each){
		File.stub(:exists?).and_call_original
	}

	it 'should install and configure default steps when the couch database file is missing' do
		File.should_receive(:exists?).with('/usr/local/var/lib/couchdb/registry.couch').and_return(false)

		chef_run.converge("#{described_cookbook}::default")

		expect(chef_run).to install_package 'curl'
		expect(chef_run).to execute_command 'killall beam'
		expect(chef_run).to restart_service 'couchdb'
	end<commit_msg>Add platform to chefspec.<commit_after>require 'spec_helper'

describe "#{File.basename(Dir.getwd)}::default" do
	let(:chef_run) {
		ChefSpec::ChefRunner.new(
			:evaluate_guards => true,
			platform: 'ubuntu',
			version:'12.04'
		)
	}

	before(:each){
		File.stub(:exists?).and_call_original
	}

	it 'should install and configure default steps when the couch database file is missing' do
		File.should_receive(:exists?).with('/usr/local/var/lib/couchdb/registry.couch').and_return(false)

		chef_run.converge("#{described_cookbook}::default")

		expect(chef_run).to install_package 'curl'
		expect(chef_run).to execute_command 'killall beam'
		expect(chef_run).to restart_service 'couchdb'
	end
{'fraction_non_alphanumeric': 0.13834586466165413, 'fraction_numerical': 0.0030075187969924814, 'mean_word_length': 5.932291666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3701715', 'n_tokens_mistral': 506, 'n_tokens_neox': 457, 'n_words': 82}