Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update README to suggest contain_ over create_

  • Loading branch information...
commit d13bee6a26cf8eba0f60775106831a8d66a96774 1 parent 3e2b4ce
@rodjek authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 README.md
View
10 README.md
@@ -55,15 +55,15 @@ argument
You can test if a resource exists in the catalogue with the generic
`creates_<resource type>` matcher. If your resource type includes :: (e.g.
-`foo::bar` simply replace the :: with -
+`foo::bar` simply replace the :: with __ (two underscores).
- it { should create_augeas('bleh') }
- it { should create_foo-bar('baz') }
+ it { should contain_augeas('bleh') }
+ it { should contain_foo__bar('baz') }
You can further test the parameters that have been passed to the resources with
the generic `with_<parameter>` chains.
- it { should create_package('mysql-server').with_ensure('present') }
+ it { should contain_package('mysql-server').with_ensure('present') }
## Writing tests
@@ -87,7 +87,7 @@ We can write the following testcase
let(:title) { 'baz' }
let(:params) { { :value => 'foo' } }
- it { should create_exec('sysctl/reload').with_command("/sbin/sysctl -p /etc/sysctl.conf") }
+ it { should contain_exec('sysctl/reload').with_command("/sbin/sysctl -p /etc/sysctl.conf") }
end
### Specifying the title of a resource
Please sign in to comment.
Something went wrong with that request. Please try again.