spec/cany/recipes/thin_spec.rb in cany-0.5.3 vs spec/cany/recipes/thin_spec.rb in cany-0.5.4

- old
+ new

@@ -1,6 +1,7 @@ require 'spec_helper' +require 'yaml' describe Cany::Recipes::Thin do let(:setup) { proc { use :thin } } let(:spec) do Cany::Specification.new do @@ -25,15 +26,15 @@ expect(recipe).to receive(:install_service).with( :thin, %w(/usr/bin/test thin start --config /etc/test/thin.yml), user: 'www-data', group: 'www-data' ) - expect(recipe).to receive(:install_content).with '/etc/test/thin.yml', <<CONFIG ---- -environment: production -socket: /var/run/test/sock -pid: /var/run/test/thin.pid -CONFIG + data = { + 'environment' => 'production', + 'socket' => "/var/run/test/sock", + 'pid' => '/var/run/test/thin.pid' + } + expect(recipe).to receive(:install_content).with '/etc/test/thin.yml', YAML.dump(data) subject expect(pre_scripts).to eq({ mkdir_run: 'mkdir -p /var/run/test', chown_run: 'chown www-data:www-data /var/run/test' })