Skip to content

Commit

Permalink
stub file test
Browse files Browse the repository at this point in the history
  • Loading branch information
reset committed Feb 6, 2015
1 parent 1627ff5 commit 681a911
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
at_exit { ChefSpec::Coverage.report! }

RSpec.shared_context 'recipe tests', type: :recipe do
before do
stub_command("test -L /usr/local/bin/consul").and_return(true)
end

let(:chef_run) { ChefSpec::Runner.new(node_attributes).converge(described_recipe) }

def node_attributes
Expand All @@ -47,6 +51,10 @@ def node_attributes
end

RSpec.shared_context "resource tests", type: :resource do
before do
stub_command("test -L /usr/local/bin/consul").and_return(true)
end

let(:chef_run) do
ChefSpec::SoloRunner.new(node_attributes.merge(step_into)).converge(example_recipe)
end
Expand Down

0 comments on commit 681a911

Please sign in to comment.