chefspec 2.0.0 → 2.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 499bad18b2da5ab00aedf8c46c95c6045e95f81c
4
- data.tar.gz: f4e98dc5b9a45a149174f0d0e20b3c22e3781b00
3
+ metadata.gz: 99f76ee3ebc113772db94655dd859bc9904b474d
4
+ data.tar.gz: ee588d2f65647778014e5b289e1fec6665a25e62
5
5
  SHA512:
6
- metadata.gz: cd4ac9f716914dfc745cfa45f9461d714d2f8e487fd33d28f00e886d54be9f234c18e71c6799b3e92f90581d60bd73acdac7ad35870ee1f3bfbef302faf1266e
7
- data.tar.gz: 90ba125ef150adc1643f5dfabe85a893f5501b63cc7a8fce4e815012f78d7825d2743aef0d59c7238c3fbf9e863e26e094a294afc86a069b11782b92d58785e0
6
+ metadata.gz: e5803437489929a05a1f2432d6d93ae16beb5f06d9cf67756a41d1f3a84943b6baf25c308a2427044e923a450bd70820baa48ad69724674a1012bd84928ddbae
7
+ data.tar.gz: 04dba2a600d9a4f7c2299d2a54d57b34bb21ac9291e4dd5c920604495d1b06fe24b9b222ec3ee1b7a54aca9647bd75a6751beb3107de83df0d9f509b39131bc0
@@ -32,16 +32,19 @@ def define_resource_matchers(actions, resource_types, name_attribute)
32
32
  accepted_types = [resource_type.to_s]
33
33
  accepted_types += ['template', 'cookbook_file'] if action.to_s == 'create' and resource_type.to_s == 'file'
34
34
  chef_run.resources.any? do |resource|
35
- (accepted_types.include? resource_type(resource) and
36
- name === resource.send(name_attribute) and
37
- resource_actions(resource).include? action.to_s)
35
+ if (accepted_types.include? resource_type(resource) and
36
+ name === resource.send(name_attribute) and
37
+ resource_actions(resource).include? action.to_s)
38
+ @resource_name = resource.send(name_attribute)
39
+ true
40
+ end
38
41
  end
39
42
  end
40
43
  failure_message_for_should do |actual|
41
- "No #{resource_type} resource named '#{name}' with action :#{action} found."
44
+ "No #{resource_type} resource matching name '#{name}' with action :#{action} found."
42
45
  end
43
46
  failure_message_for_should_not do |actual|
44
- "Found #{resource_type} resource named '#{name}' with action :#{action} that should not exist."
47
+ "Found #{resource_type} resource named '#{@resource_name}' matching name: '#{name}' with action :#{action} that should not exist."
45
48
  end
46
49
  end
47
50
  end
@@ -13,7 +13,7 @@ class Hash
13
13
 
14
14
  # Monkey-patch to stdlib Hash to correspond to Mash-style lookup
15
15
  # @see {Hash#respond_to?}
16
- def respond_to?(m)
16
+ def respond_to?(m, include_private = false)
17
17
  if has_key?(m.to_sym) || has_key?(m.to_s)
18
18
  true
19
19
  else
@@ -1,4 +1,4 @@
1
1
  module ChefSpec
2
2
  # The gem version
3
- VERSION = '2.0.0'
3
+ VERSION = '2.0.1'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chefspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Crump
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-22 00:00:00.000000000 Z
11
+ date: 2013-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef
@@ -222,6 +222,6 @@ rubyforge_project:
222
222
  rubygems_version: 2.0.3
223
223
  signing_key:
224
224
  specification_version: 4
225
- summary: chefspec-2.0.0
225
+ summary: chefspec-2.0.1
226
226
  test_files: []
227
227
  has_rdoc: