rspec-puppet 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -55,15 +55,15 @@ argument
55
55
 
56
56
  You can test if a resource exists in the catalogue with the generic
57
57
  `creates_<resource type>` matcher. If your resource type includes :: (e.g.
58
- `foo::bar` simply replace the :: with -
58
+ `foo::bar` simply replace the :: with __ (two underscores).
59
59
 
60
- it { should create_augeas('bleh') }
61
- it { should create_foo-bar('baz') }
60
+ it { should contain_augeas('bleh') }
61
+ it { should contain_foo__bar('baz') }
62
62
 
63
63
  You can further test the parameters that have been passed to the resources with
64
64
  the generic `with_<parameter>` chains.
65
65
 
66
- it { should create_package('mysql-server').with_ensure('present') }
66
+ it { should contain_package('mysql-server').with_ensure('present') }
67
67
 
68
68
  ## Writing tests
69
69
 
@@ -87,7 +87,7 @@ We can write the following testcase
87
87
  let(:title) { 'baz' }
88
88
  let(:params) { { :value => 'foo' } }
89
89
 
90
- it { should create_exec('sysctl/reload').with_command("/sbin/sysctl -p /etc/sysctl.conf") }
90
+ it { should contain_exec('sysctl/reload').with_command("/sbin/sysctl -p /etc/sysctl.conf") }
91
91
  end
92
92
 
93
93
  ### Specifying the title of a resource
@@ -40,15 +40,15 @@ module RSpec::Puppet
40
40
  end
41
41
 
42
42
  def failure_message_for_should
43
- "expected that the catalogue would contain #{@referenced_type}[\"#{@title}\"]#{errors}"
43
+ "expected that the catalogue would contain #{@referenced_type}[#{@title}]#{errors}"
44
44
  end
45
45
 
46
46
  def failure_message_for_should_not
47
- "expected that the catalogue would not contain #{@referenced_type}[\"#{@title}\"]#{errors}"
47
+ "expected that the catalogue would not contain #{@referenced_type}[#{@title}]#{errors}"
48
48
  end
49
49
 
50
50
  def description
51
- "create #{@referenced_type}[\"#{@title}\"]"
51
+ "create #{@referenced_type}[#{@title}]"
52
52
  end
53
53
 
54
54
  private
@@ -8,11 +8,11 @@ module RSpec::Puppet
8
8
  end
9
9
 
10
10
  description do
11
- "include Class['#{expected_class}']"
11
+ "include Class[#{expected_class}]"
12
12
  end
13
13
 
14
14
  failure_message_for_should do |actual|
15
- "expected that the catalogue would include Class['#{expected_class}']"
15
+ "expected that the catalogue would include Class[#{expected_class}]"
16
16
  end
17
17
  end
18
18
  end
@@ -1,5 +1,5 @@
1
1
  module RSpec::Puppet
2
- module Support
2
+ module Support
3
3
  def build_catalog nodename, facts_val
4
4
  node_obj = Puppet::Node.new(nodename)
5
5
 
@@ -9,8 +9,7 @@ module RSpec::Puppet
9
9
  if Puppet::Resource::Catalog.respond_to? :find
10
10
  Puppet::Resource::Catalog.find(node_obj.name, :use_node => node_obj)
11
11
  else
12
- require 'puppet/face'
13
- Puppet::Face[:catalog, :current].find(node_obj.name, :use_node => node_obj)
12
+ Puppet::Resource::Catalog.indirection.find(node_obj.name, :use_node => node_obj)
14
13
  end
15
14
  end
16
15
  end
data/rspec-puppet.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'rspec-puppet'
3
- s.version = '0.0.5'
3
+ s.version = '0.0.6'
4
4
  s.homepage = 'https://github.com/rodjek/rspec-puppet/'
5
5
  s.summary = 'RSpec tests for your Puppet manifests'
6
6
  s.description = 'RSpec tests for your Puppet manifests'
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 5
9
- version: 0.0.5
8
+ - 6
9
+ version: 0.0.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tim Sharpe
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-08-07 00:00:00 -07:00
17
+ date: 2011-08-10 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency