chefspec 4.0.2 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/CHANGELOG.md +19 -0
- data/README.md +84 -87
- data/chefspec.gemspec +1 -1
- data/examples/apt_package/spec/install_spec.rb +1 -1
- data/examples/apt_package/spec/purge_spec.rb +1 -1
- data/examples/apt_package/spec/reconfig_spec.rb +1 -1
- data/examples/apt_package/spec/remove_spec.rb +1 -1
- data/examples/apt_package/spec/upgrade_spec.rb +1 -1
- data/examples/attributes/spec/default_spec.rb +1 -1
- data/examples/batch/spec/run_spec.rb +1 -1
- data/examples/cached/spec/default_spec.rb +1 -1
- data/examples/chef_gem/spec/install_spec.rb +1 -1
- data/examples/chef_gem/spec/purge_spec.rb +1 -1
- data/examples/chef_gem/spec/reconfig_spec.rb +1 -1
- data/examples/chef_gem/spec/remove_spec.rb +1 -1
- data/examples/chef_gem/spec/upgrade_spec.rb +1 -1
- data/examples/compile_time/spec/default_spec.rb +1 -1
- data/examples/cookbook_file/spec/create_if_missing_spec.rb +1 -1
- data/examples/cookbook_file/spec/create_spec.rb +1 -1
- data/examples/cookbook_file/spec/delete_spec.rb +1 -1
- data/examples/cookbook_file/spec/touch_spec.rb +1 -1
- data/examples/cron/spec/create_spec.rb +1 -1
- data/examples/cron/spec/delete_spec.rb +1 -1
- data/examples/custom_matcher/libraries/matcher.rb +1 -1
- data/examples/custom_matcher/spec/install_spec.rb +1 -1
- data/examples/custom_matcher/spec/remove_spec.rb +1 -1
- data/examples/deploy/spec/deploy_spec.rb +1 -1
- data/examples/deploy/spec/force_deploy_spec.rb +1 -1
- data/examples/deploy/spec/rollback_spec.rb +1 -1
- data/examples/directory/spec/create_spec.rb +1 -1
- data/examples/directory/spec/delete_spec.rb +1 -1
- data/examples/do_nothing/spec/default_spec.rb +1 -1
- data/examples/dpkg_package/spec/install_spec.rb +1 -1
- data/examples/dpkg_package/spec/purge_spec.rb +1 -1
- data/examples/dpkg_package/spec/remove_spec.rb +1 -1
- data/examples/easy_install_package/spec/install_spec.rb +1 -1
- data/examples/easy_install_package/spec/purge_spec.rb +1 -1
- data/examples/easy_install_package/spec/remove_spec.rb +1 -1
- data/examples/easy_install_package/spec/upgrade_spec.rb +1 -1
- data/examples/env/spec/create_spec.rb +1 -1
- data/examples/env/spec/delete_spec.rb +1 -1
- data/examples/env/spec/modify_spec.rb +1 -1
- data/examples/erl_call/spec/run_spec.rb +1 -1
- data/examples/execute/spec/run_spec.rb +1 -1
- data/examples/expect_exception/spec/compile_error_spec.rb +1 -1
- data/examples/expect_exception/spec/converge_error_spec.rb +1 -1
- data/examples/expect_exception/spec/no_error_spec.rb +1 -1
- data/examples/file/spec/create_if_missing_spec.rb +1 -1
- data/examples/file/spec/create_spec.rb +1 -1
- data/examples/file/spec/delete_spec.rb +1 -1
- data/examples/file/spec/touch_spec.rb +1 -1
- data/examples/freebsd_package/spec/install_spec.rb +1 -1
- data/examples/freebsd_package/spec/remove_spec.rb +1 -1
- data/examples/gem_package/spec/install_spec.rb +1 -1
- data/examples/gem_package/spec/purge_spec.rb +1 -1
- data/examples/gem_package/spec/reconfig_spec.rb +1 -1
- data/examples/gem_package/spec/remove_spec.rb +1 -1
- data/examples/gem_package/spec/upgrade_spec.rb +1 -1
- data/examples/git/spec/checkout_spec.rb +1 -1
- data/examples/git/spec/export_spec.rb +1 -1
- data/examples/git/spec/sync_spec.rb +1 -1
- data/examples/group/spec/create_spec.rb +1 -1
- data/examples/group/spec/manage_spec.rb +1 -1
- data/examples/group/spec/modify_spec.rb +1 -1
- data/examples/group/spec/remove_spec.rb +1 -1
- data/examples/guards/spec/default_spec.rb +1 -1
- data/examples/heavy_provider_light_resource/spec/provider_service_spec.rb +1 -1
- data/examples/http_request/spec/delete_spec.rb +1 -1
- data/examples/http_request/spec/get_spec.rb +1 -1
- data/examples/http_request/spec/head_spec.rb +1 -1
- data/examples/http_request/spec/options_spec.rb +1 -1
- data/examples/http_request/spec/post_spec.rb +1 -1
- data/examples/http_request/spec/put_spec.rb +1 -1
- data/examples/ifconfig/spec/add_spec.rb +1 -1
- data/examples/ifconfig/spec/delete_spec.rb +1 -1
- data/examples/ifconfig/spec/disable_spec.rb +1 -1
- data/examples/ifconfig/spec/enable_spec.rb +1 -1
- data/examples/include_recipe/spec/default_spec.rb +1 -1
- data/examples/inherits/spec/default_spec.rb +1 -1
- data/examples/ips_package/spec/install_spec.rb +1 -1
- data/examples/ips_package/spec/remove_spec.rb +1 -1
- data/examples/ips_package/spec/upgrade_spec.rb +1 -1
- data/examples/link/spec/create_spec.rb +1 -1
- data/examples/link/spec/delete_spec.rb +1 -1
- data/examples/link/spec/link_to_spec.rb +1 -1
- data/examples/log/spec/write_spec.rb +1 -1
- data/examples/macports_package/spec/install_spec.rb +1 -1
- data/examples/macports_package/spec/purge_spec.rb +1 -1
- data/examples/macports_package/spec/remove_spec.rb +1 -1
- data/examples/macports_package/spec/upgrade_spec.rb +1 -1
- data/examples/mdadm/spec/assemble_spec.rb +1 -1
- data/examples/mdadm/spec/create_spec.rb +1 -1
- data/examples/mdadm/spec/stop_spec.rb +1 -1
- data/examples/mount/spec/disable_spec.rb +1 -1
- data/examples/mount/spec/enable_spec.rb +1 -1
- data/examples/mount/spec/mount_spec.rb +1 -1
- data/examples/mount/spec/remount_spec.rb +1 -1
- data/examples/mount/spec/umount_spec.rb +1 -1
- data/examples/multiple_actions/spec/default_spec.rb +1 -1
- data/examples/multiple_actions/spec/sequential_spec.rb +4 -1
- data/examples/multiple_run_action/spec/default_spec.rb +1 -1
- data/examples/notifications/spec/chained_spec.rb +1 -1
- data/examples/notifications/spec/default_spec.rb +1 -1
- data/examples/notifications/spec/delayed_spec.rb +1 -1
- data/examples/notifications/spec/immediately_spec.rb +1 -1
- data/examples/ohai/spec/reload_spec.rb +1 -1
- data/examples/package/spec/install_spec.rb +1 -1
- data/examples/package/spec/purge_spec.rb +1 -1
- data/examples/package/spec/reconfig_spec.rb +1 -1
- data/examples/package/spec/remove_spec.rb +1 -1
- data/examples/package/spec/upgrade_spec.rb +1 -1
- data/examples/pacman_package/spec/install_spec.rb +1 -1
- data/examples/pacman_package/spec/purge_spec.rb +1 -1
- data/examples/pacman_package/spec/remove_spec.rb +1 -1
- data/examples/pacman_package/spec/upgrade_spec.rb +1 -1
- data/examples/portage_package/spec/install_spec.rb +1 -1
- data/examples/portage_package/spec/purge_spec.rb +1 -1
- data/examples/portage_package/spec/remove_spec.rb +1 -1
- data/examples/portage_package/spec/upgrade_spec.rb +1 -1
- data/examples/powershell_script/spec/run_spec.rb +1 -1
- data/examples/registry_key/spec/create_if_missing_spec.rb +1 -1
- data/examples/registry_key/spec/create_spec.rb +1 -1
- data/examples/registry_key/spec/delete_key_spec.rb +1 -1
- data/examples/registry_key/spec/delete_spec.rb +1 -1
- data/examples/remote_directory/spec/create_if_missing_spec.rb +1 -1
- data/examples/remote_directory/spec/create_spec.rb +1 -1
- data/examples/remote_directory/spec/delete_spec.rb +1 -1
- data/examples/remote_file/spec/create_if_missing_spec.rb +1 -1
- data/examples/remote_file/spec/create_spec.rb +1 -1
- data/examples/remote_file/spec/delete_spec.rb +1 -1
- data/examples/remote_file/spec/touch_spec.rb +1 -1
- data/examples/render_file/spec/default_spec.rb +1 -1
- data/examples/render_file/spec/template_helpers_spec.rb +1 -1
- data/examples/roles/spec/default_spec.rb +1 -1
- data/examples/route/spec/add_spec.rb +1 -1
- data/examples/route/spec/delete_spec.rb +1 -1
- data/examples/rpm_package/spec/install_spec.rb +1 -1
- data/examples/rpm_package/spec/remove_spec.rb +1 -1
- data/examples/rpm_package/spec/upgrade_spec.rb +1 -1
- data/examples/ruby_block/spec/run_spec.rb +1 -1
- data/examples/script/spec/run_bash_spec.rb +1 -1
- data/examples/script/spec/run_csh_spec.rb +1 -1
- data/examples/script/spec/run_perl_spec.rb +1 -1
- data/examples/script/spec/run_python_spec.rb +1 -1
- data/examples/script/spec/run_ruby_spec.rb +1 -1
- data/examples/script/spec/run_script_spec.rb +1 -1
- data/examples/server/spec/client_spec.rb +5 -4
- data/examples/server/spec/data_bag_spec.rb +10 -9
- data/examples/server/spec/environment_spec.rb +5 -4
- data/examples/server/spec/node_spec.rb +20 -14
- data/examples/server/spec/render_with_cached_spec.rb +1 -2
- data/examples/server/spec/role_spec.rb +5 -4
- data/examples/server/spec/search_spec.rb +7 -8
- data/examples/service/spec/disable_spec.rb +1 -1
- data/examples/service/spec/enable_spec.rb +1 -1
- data/examples/service/spec/reload_spec.rb +1 -1
- data/examples/service/spec/restart_spec.rb +1 -1
- data/examples/service/spec/start_spec.rb +1 -1
- data/examples/service/spec/stop_spec.rb +1 -1
- data/examples/smartos_package/spec/install_spec.rb +1 -1
- data/examples/smartos_package/spec/remove_spec.rb +1 -1
- data/examples/smartos_package/spec/upgrade_spec.rb +1 -1
- data/examples/solaris_package/spec/install_spec.rb +1 -1
- data/examples/solaris_package/spec/remove_spec.rb +1 -1
- data/examples/state_attrs/spec/default_spec.rb +2 -2
- data/examples/step_into/spec/default_spec.rb +5 -2
- data/examples/stub_command/spec/default_spec.rb +1 -1
- data/examples/stub_data_bag/spec/default_spec.rb +1 -1
- data/examples/stub_data_bag_item/spec/default_spec.rb +1 -1
- data/examples/stub_search/spec/default_spec.rb +1 -1
- data/examples/subscribes/spec/chained_spec.rb +1 -1
- data/examples/subscribes/spec/default_spec.rb +1 -1
- data/examples/subscribes/spec/delayed_spec.rb +1 -1
- data/examples/subscribes/spec/immediately_spec.rb +1 -1
- data/examples/subversion/spec/checkout_spec.rb +1 -1
- data/examples/subversion/spec/export_spec.rb +1 -1
- data/examples/subversion/spec/force_export_spec.rb +1 -1
- data/examples/subversion/spec/sync_spec.rb +1 -1
- data/examples/template/spec/create_if_missing_spec.rb +1 -1
- data/examples/template/spec/create_spec.rb +1 -1
- data/examples/template/spec/delete_spec.rb +1 -1
- data/examples/template/spec/touch_spec.rb +1 -1
- data/examples/use_inline_resources/spec/default_spec.rb +4 -1
- data/examples/user/spec/create_spec.rb +1 -1
- data/examples/user/spec/lock_spec.rb +1 -1
- data/examples/user/spec/manage_spec.rb +1 -1
- data/examples/user/spec/modify_spec.rb +1 -1
- data/examples/user/spec/remove_spec.rb +1 -1
- data/examples/user/spec/unlock_spec.rb +1 -1
- data/examples/yum_package/spec/install_spec.rb +1 -1
- data/examples/yum_package/spec/purge_spec.rb +1 -1
- data/examples/yum_package/spec/remove_spec.rb +1 -1
- data/examples/yum_package/spec/upgrade_spec.rb +1 -1
- data/features/batch.feature +0 -3
- data/features/powershell_script.feature +0 -3
- data/features/render_file.feature +1 -6
- data/features/server.feature +0 -3
- data/features/smartos_package.feature +0 -4
- data/features/solaris_package.feature +0 -4
- data/features/state_attrs.feature +0 -4
- data/features/support/env.rb +0 -7
- data/gemfiles/{chef-11.12.0.gemfile → chef-11.16.0.gemfile} +1 -1
- data/gemfiles/chef-12.0.0.alpha.gemfile +5 -0
- data/lib/chefspec.rb +46 -14
- data/lib/chefspec/api.rb +0 -2
- data/lib/chefspec/api/apt_package.rb +1 -1
- data/lib/chefspec/api/batch.rb +1 -1
- data/lib/chefspec/api/chef_gem.rb +1 -1
- data/lib/chefspec/api/cookbook_file.rb +1 -1
- data/lib/chefspec/api/cron.rb +1 -1
- data/lib/chefspec/api/deploy.rb +1 -1
- data/lib/chefspec/api/directory.rb +1 -1
- data/lib/chefspec/api/dpkg_package.rb +1 -1
- data/lib/chefspec/api/easy_install_package.rb +1 -1
- data/lib/chefspec/api/env.rb +1 -1
- data/lib/chefspec/api/erl_call.rb +1 -1
- data/lib/chefspec/api/execute.rb +1 -1
- data/lib/chefspec/api/file.rb +1 -1
- data/lib/chefspec/api/freebsd_package.rb +1 -1
- data/lib/chefspec/api/gem_package.rb +1 -1
- data/lib/chefspec/api/git.rb +1 -1
- data/lib/chefspec/api/group.rb +1 -1
- data/lib/chefspec/api/http_request.rb +1 -1
- data/lib/chefspec/api/ifconfig.rb +1 -1
- data/lib/chefspec/api/ips_package.rb +1 -1
- data/lib/chefspec/api/link.rb +1 -1
- data/lib/chefspec/api/log.rb +1 -1
- data/lib/chefspec/api/macports_package.rb +1 -1
- data/lib/chefspec/api/mdadm.rb +1 -1
- data/lib/chefspec/api/mount.rb +1 -1
- data/lib/chefspec/api/ohai.rb +2 -2
- data/lib/chefspec/api/package.rb +1 -1
- data/lib/chefspec/api/pacman_package.rb +1 -1
- data/lib/chefspec/api/portage_package.rb +1 -1
- data/lib/chefspec/api/powershell_script.rb +1 -1
- data/lib/chefspec/api/registry_key.rb +1 -1
- data/lib/chefspec/api/remote_directory.rb +4 -4
- data/lib/chefspec/api/remote_file.rb +1 -1
- data/lib/chefspec/api/route.rb +1 -1
- data/lib/chefspec/api/rpm_package.rb +1 -1
- data/lib/chefspec/api/ruby_block.rb +1 -1
- data/lib/chefspec/api/script.rb +6 -6
- data/lib/chefspec/api/service.rb +1 -1
- data/lib/chefspec/api/smartos_package.rb +1 -1
- data/lib/chefspec/api/solaris_package.rb +1 -1
- data/lib/chefspec/api/subversion.rb +1 -1
- data/lib/chefspec/api/template.rb +1 -1
- data/lib/chefspec/api/user.rb +1 -1
- data/lib/chefspec/api/yum_package.rb +1 -1
- data/lib/chefspec/coverage/filters.rb +3 -0
- data/lib/chefspec/deprecations.rb +19 -123
- data/lib/chefspec/macros.rb +2 -2
- data/lib/chefspec/matchers/render_file_matcher.rb +2 -2
- data/lib/chefspec/matchers/resource_matcher.rb +1 -1
- data/lib/chefspec/matchers/state_attrs_matcher.rb +1 -1
- data/lib/chefspec/server.rb +4 -361
- data/lib/chefspec/server_methods.rb +175 -0
- data/lib/chefspec/server_runner.rb +86 -0
- data/lib/chefspec/{runner.rb → solo_runner.rb} +92 -43
- data/lib/chefspec/version.rb +1 -1
- data/spec/unit/{runner_spec.rb → solo_runner_spec.rb} +31 -25
- metadata +13 -10
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'mdadm::assemble' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'assembles a mdadm with an explicit action' do
|
7
7
|
expect(chef_run).to assemble_mdadm('explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'mdadm::create' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'creates a mdadm with the default action' do
|
7
7
|
expect(chef_run).to create_mdadm('default_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'mdadm::stop' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'stops a mdadm with an explicit action' do
|
7
7
|
expect(chef_run).to stop_mdadm('explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'mount::disable' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'disables a mount with an explicit action' do
|
7
7
|
expect(chef_run).to disable_mount('/tmp/explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'mount::enable' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'enables a mount with an explicit action' do
|
7
7
|
expect(chef_run).to enable_mount('/tmp/explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'mount::mount' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'mounts a mount with the default action' do
|
7
7
|
expect(chef_run).to mount_mount('/tmp/default_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'mount::remount' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'remounts a mount with an explicit action' do
|
7
7
|
expect(chef_run).to remount_mount('/tmp/explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'mount::umount' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'umounts a mount with an explicit action' do
|
7
7
|
expect(chef_run).to umount_mount('/tmp/explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'multiple_actions::default' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'executes both actions' do
|
7
7
|
expect(chef_run).to enable_service('resource')
|
@@ -1,7 +1,10 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'multiple_actions::sequential' do
|
4
|
-
let(:chef_run)
|
4
|
+
let(:chef_run) do
|
5
|
+
ChefSpec::SoloRunner.new(log_level: :fatal)
|
6
|
+
.converge(described_recipe)
|
7
|
+
end
|
5
8
|
|
6
9
|
it 'executes both actions' do
|
7
10
|
expect(chef_run).to start_service('resource')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'multiple_run_action::default' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'includes the action explicitly given to the resource' do
|
7
7
|
expect(chef_run).to create_template('/tmp/resource')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'notifications::chained' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
let(:template) { chef_run.template('template') }
|
6
6
|
let(:service) { chef_run.service('service') }
|
7
7
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'notifications::default' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
let(:template) { chef_run.template('/tmp/notifying_resource') }
|
6
6
|
|
7
7
|
it 'sends a notification to the service' do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'notifications::delayed' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
let(:template) { chef_run.template('/tmp/notifying_resource') }
|
6
6
|
|
7
7
|
it 'sends a notification to the service' do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'notifications::immediately' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
let(:template) { chef_run.template('/tmp/notifying_resource') }
|
6
6
|
|
7
7
|
it 'sends a notification to the service' do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'ohai::reload' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'reloads a ohai with the default action' do
|
7
7
|
expect(chef_run).to reload_ohai('default_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'package::install' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'installs a package with the default action' do
|
7
7
|
expect(chef_run).to install_package('default_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'package::purge' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'purges a package with an explicit action' do
|
7
7
|
expect(chef_run).to purge_package('explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'package::reconfig' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'reconfigs a package with an explicit action' do
|
7
7
|
expect(chef_run).to reconfig_package('explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'package::remove' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'removes a package with an explicit action' do
|
7
7
|
expect(chef_run).to remove_package('explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'package::upgrade' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'upgrades a package with an explicit action' do
|
7
7
|
expect(chef_run).to upgrade_package('explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'pacman_package::install' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'installs a pacman_package with the default action' do
|
7
7
|
expect(chef_run).to install_pacman_package('default_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'pacman_package::purge' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'purges a pacman_package with an explicit action' do
|
7
7
|
expect(chef_run).to purge_pacman_package('explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'pacman_package::remove' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'removes a pacman_package with an explicit action' do
|
7
7
|
expect(chef_run).to remove_pacman_package('explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'pacman_package::upgrade' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'upgrades a pacman_package with an explicit action' do
|
7
7
|
expect(chef_run).to upgrade_pacman_package('explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'portage_package::install' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'installs a portage_package with the default action' do
|
7
7
|
expect(chef_run).to install_portage_package('default_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'portage_package::purge' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'purges a portage_package with an explicit action' do
|
7
7
|
expect(chef_run).to purge_portage_package('explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'portage_package::remove' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'removes a portage_package with an explicit action' do
|
7
7
|
expect(chef_run).to remove_portage_package('explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'portage_package::upgrade' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'upgrades a portage_package with an explicit action' do
|
7
7
|
expect(chef_run).to upgrade_portage_package('explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'powershell_script::run' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'runs a powershell_script with the default action' do
|
7
7
|
expect(chef_run).to run_powershell_script('default_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'registry_key::create_if_missing' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'creates a registry_key with an explicit action' do
|
7
7
|
expect(chef_run).to create_registry_key_if_missing('HKEY_LOCAL_MACHINE\explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'registry_key::create' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'creates a registry_key with the default action' do
|
7
7
|
expect(chef_run).to create_registry_key('HKEY_LOCAL_MACHINE\default_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'registry_key::delete_key' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'delete_keyes a registry_key with an explicit action' do
|
7
7
|
expect(chef_run).to delete_key_registry_key('HKEY_LOCAL_MACHINE\explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'registry_key::delete' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'deletes a registry_key with an explicit action' do
|
7
7
|
expect(chef_run).to delete_registry_key('HKEY_LOCAL_MACHINE\explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'remote_directory::create_if_missing' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'creates a remote_directory with an explicit action' do
|
7
7
|
expect(chef_run).to create_remote_directory_if_missing('/tmp/explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'remote_directory::create' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'creates a remote_directory with the default action' do
|
7
7
|
expect(chef_run).to create_remote_directory('/tmp/default_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'remote_directory::delete' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'deletes a remote_directory with an explicit action' do
|
7
7
|
expect(chef_run).to delete_remote_directory('/tmp/explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'remote_file::create_if_missing' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'creates a remote_file with an explicit action' do
|
7
7
|
expect(chef_run).to create_remote_file_if_missing('/tmp/explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'remote_file::create' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'creates a remote_file with the default action' do
|
7
7
|
expect(chef_run).to create_remote_file('/tmp/default_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'remote_file::delete' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'deletes a remote_file with an explicit action' do
|
7
7
|
expect(chef_run).to delete_remote_file('/tmp/explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'remote_file::touch' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'touchs a remote_file with an explicit action' do
|
7
7
|
expect(chef_run).to touch_remote_file('/tmp/explicit_action')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'chefspec'
|
2
2
|
|
3
3
|
describe 'render_file::template_helpers' do
|
4
|
-
let(:chef_run) { ChefSpec::
|
4
|
+
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
|
5
5
|
|
6
6
|
it 'renders the file using a helper' do
|
7
7
|
expect(chef_run).to render_file('/tmp/template_with_helper')
|