forked from Foodcritic/foodcritic
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FC027: Resource sets internal attribute.
- Loading branch information
Andrew Crump
committed
Jun 2, 2012
1 parent
2500d5d
commit 5fcadb7
Showing
4 changed files
with
45 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Feature: Check for use of internal attributes | ||
|
||
In order to avoid confusion about the expected state of a converged node | ||
As a developer | ||
I want to identify calls to 'internal' resource attributes | ||
|
||
Scenario Outline: Access of internal attributes | ||
Given a cookbook recipe that declares a <resource> resource with the <attribute> attribute set to <value> | ||
When I check the cookbook | ||
Then the resource sets internal attribute warning 027 should be <show_warning> | ||
|
||
Examples: | ||
| resource | attribute | value | show_warning | | ||
| service | enabled | true | shown | | ||
| service | enabled | false | shown | | ||
| service | enabled | [].include?('foo') | shown | | ||
| service | running | true | shown | | ||
| service | running | false | shown | | ||
| service | running | [].include?('foo') | shown | | ||
| service | service_name | "foo" | not shown | | ||
| my_lwrp | enabled | true | not shown | | ||
| my_lwrp | running | true | not shown | |
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