Sha256: ee76b5508aed5edaafc1f763f8df1e4f774dbbc2a33d88564f098d2244df6b0d
Contents?: true
Size: 630 Bytes
Versions: 3
Compression:
Stored size: 630 Bytes
Contents
if defined?(ChefSpec) # Custom ChefSpec matchers module ChefSpec::Matchers RSpec::Matchers.define :enable_nginx_site do |site| match do |chef_run| chef_run.resource_collection.all_resources.any? do |resource| resource.resource_name == :execute && resource.name =~ /.*nxensite.*#{site}/ end end end RSpec::Matchers.define :disable_nginx_site do |site| match do |chef_run| chef_run.resource_collection.all_resources.any? do |resource| resource.resource_name == :execute && resource.name =~ /.*nxdissite.*#{site}/ end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
from-scratch-0.7.0 | cookbooks/nginx/libraries/matchers.rb |
from-scratch-0.6.0 | cookbooks/nginx/libraries/matchers.rb |
from-scratch-0.5.0 | cookbooks/nginx/libraries/matchers.rb |