-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add .tagged and .not_tagged methods for resource matcher
- Loading branch information
Showing
4 changed files
with
101 additions
and
15 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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require 'spec_helper' | ||
|
||
describe 'tags_testing' do | ||
it { should compile } | ||
it { should contain_class('sysctl::common') | ||
.tagged('sysctl') | ||
.tagged('keyword_tag') | ||
.not_tagged('no_such_tag') | ||
} | ||
it { should contain_file('/tmp/a') | ||
.tagged('keyword_tag') | ||
.not_tagged('not_even_this') | ||
.not_tagged('metaparam_tag') | ||
} | ||
it { should contain_file('/tmp/b') | ||
.with_ensure('present') | ||
.tagged(['keyword_tag', 'metaparam_tag']) | ||
} | ||
end |