-
-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A few more fine tunes to the test suite.
- Loading branch information
1 parent
7b9fca6
commit b4b1e1f
Showing
5 changed files
with
28 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
require 'spec_helper' | ||
|
||
describe_recipe 'consul::default' do | ||
it { expect(chef_run).to include_recipe('consul::install_binary') } | ||
it { expect(chef_run).not_to include_recipe('consul::install_source') } | ||
it { expect(chef_run).to include_recipe('consul::_service') } | ||
|
||
context 'with default attributes' do | ||
it { expect(chef_run).to include_recipe('consul::install_binary') } | ||
it { expect(chef_run).not_to include_recipe('consul::install_source') } | ||
end | ||
|
||
context %Q(sets node['consul']['install_method'] = 'source') do | ||
let(:chef_run) do | ||
ChefSpec::Runner.new(node_attributes) do |node| | ||
node.override['consul']['install_method'] = 'source' | ||
node.set['consul']['install_method'] = 'source' | ||
end.converge(described_recipe) | ||
end | ||
|
||
before do | ||
stub_command("/usr/local/go/bin/go version | grep \"go1.2 \"").and_return(false) | ||
end | ||
|
||
it { expect(chef_run).not_to include_recipe('consul::install_binary') } | ||
it { expect(chef_run).to include_recipe('consul::install_binary') } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters