When running chef exec rspec I get the following output:
$ chef exec rspec
F
Failures:
1) TestPhpFpmCookbook::default When all attributes are default, on an Ubuntu 16.04 converges successfully
Failure/Error: expect { chef_run }.to_not raise_error
expected no Exception, got #<ChefSpec::Error::CommandNotStubbed: Executing a real command is disabled. Unregistered command:
...tub_command("test -d /etc/php/7.0/fpm/pool.d || mkdir -p /etc/php/7.0/fpm/pool.d").and_return(...)
> with backtrace:
# ./spec/unit/recipes/default_spec.rb:15:in `block (3 levels) in <top (required)>'
# ./spec/unit/recipes/default_spec.rb:19:in `block (4 levels) in <top (required)>'
# ./spec/unit/recipes/default_spec.rb:19:in `block (3 levels) in <top (required)>'
# ./spec/unit/recipes/default_spec.rb:19:in `block (3 levels) in <top (required)>'
Finished in 25.44 seconds (files took 20.13 seconds to load)
1 example, 1 failure
Failed examples:
rspec ./spec/unit/recipes/default_spec.rb:18 # TestPhpFpmCookbook::default When all attributes are default, on an Ubuntu 16.04 converges successfully
My version of ChefDK on macOS 10.12.4:
$ chef -v
Chef Development Kit Version: 1.3.43
chef-client version: 12.19.36
delivery version: master (dd319aa632c2f550c92a2172b9d1226478fea997)
berks version: 5.6.4
kitchen version: 1.16.0
I create the cookbook doing the following chef generate cookbook TestPhpFpmCookbook. Everything is as generated unless mentioned below...
metadata.rb:
name 'TestPhpFpmCookbook'
maintainer 'The Authors'
maintainer_email 'you@example.com'
license 'All Rights Reserved'
description 'Installs/Configures TestPhpFpmCookbook'
long_description 'Installs/Configures TestPhpFpmCookbook'
version '0.1.0'
chef_version '>= 12.1' if respond_to?(:chef_version)
depends 'php-fpm', '~> 0.7.9'
When running
chef exec rspec
I get the following output:My version of ChefDK on macOS 10.12.4:
I create the cookbook doing the following
chef generate cookbook TestPhpFpmCookbook
. Everything is as generated unless mentioned below...metadata.rb:
default.rb: