Skip to content

Commit

Permalink
fix chefspec run
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
  • Loading branch information
atomic111 committed Jun 22, 2016
1 parent d7b164e commit 6129361
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion spec/unit/recipes/default_spec.rb
Expand Up @@ -4,7 +4,10 @@

describe 'apache-hardening::default' do

let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
before { allow_any_instance_of(Chef::Recipe).to receive(:search) }
let(:runner) { ChefSpec::ServerRunner.new }
let(:node) { runner.node }
let(:chef_run) { runner.converge(described_recipe) }

before do
stub_command('/usr/sbin/apache2 -t')
Expand Down
5 changes: 4 additions & 1 deletion spec/unit/recipes/hardening_spec.rb
Expand Up @@ -4,7 +4,10 @@

describe 'apache-hardening::hardening' do

let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
before { allow_any_instance_of(Chef::Recipe).to receive(:search) }
let(:runner) { ChefSpec::ServerRunner.new }
let(:node) { runner.node }
let(:chef_run) { runner.converge(described_recipe) }

before do
stub_command('/usr/sbin/apache2 -t')
Expand Down

0 comments on commit 6129361

Please sign in to comment.