summaryrefslogtreecommitdiff
path: root/spec/unit/mixin
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-02-28 22:40:53 -0800
committerTim Smith <tsmith84@gmail.com>2020-02-28 22:40:53 -0800
commit410b6c1c97b6049a0afabcf88966a590f7b1c988 (patch)
tree04167ee93c4be6f61a147d03e7611df847619231 /spec/unit/mixin
parent5f29b31fb9ed3eafcb249fb9e7056cf95497ae43 (diff)
downloadchef-410b6c1c97b6049a0afabcf88966a590f7b1c988.tar.gz
Remove constraints on specsnuke_old_specs
Run it all. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/unit/mixin')
-rw-r--r--spec/unit/mixin/shell_out_spec.rb56
1 files changed, 27 insertions, 29 deletions
diff --git a/spec/unit/mixin/shell_out_spec.rb b/spec/unit/mixin/shell_out_spec.rb
index afa3687a15..f2b0295bf6 100644
--- a/spec/unit/mixin/shell_out_spec.rb
+++ b/spec/unit/mixin/shell_out_spec.rb
@@ -246,35 +246,33 @@ describe Chef::Mixin::ShellOut do
let(:new_resource) { CustomResource.new("foo") }
let(:provider) { new_resource.provider_for_action(:install) }
- describe "on Chef-15", chef: ">= 15" do
- %i{shell_out shell_out!}.each do |method|
- stubbed_method = (method == :shell_out) ? :shell_out_compacted : :shell_out_compacted!
- it "#{method} defaults to 900 seconds" do
- expect(provider).to receive(stubbed_method).with("foo", timeout: 900)
- provider.send(method, "foo")
- end
- it "#{method} overrides the default timeout with its options" do
- expect(provider).to receive(stubbed_method).with("foo", timeout: 1)
- provider.send(method, "foo", timeout: 1)
- end
- it "#{method} overrides the new_resource.timeout with the timeout option" do
- new_resource.timeout(99)
- expect(provider).to receive(stubbed_method).with("foo", timeout: 1)
- provider.send(method, "foo", timeout: 1)
- end
- it "#{method} defaults to 900 seconds and preserves options" do
- expect(provider).to receive(stubbed_method).with("foo", env: nil, timeout: 900)
- provider.send(method, "foo", env: nil)
- end
- it "#{method} overrides the default timeout with its options and preserves options" do
- expect(provider).to receive(stubbed_method).with("foo", timeout: 1, env: nil)
- provider.send(method, "foo", timeout: 1, env: nil)
- end
- it "#{method} overrides the new_resource.timeout with the timeout option and preseves options" do
- new_resource.timeout(99)
- expect(provider).to receive(stubbed_method).with("foo", timeout: 1, env: nil)
- provider.send(method, "foo", timeout: 1, env: nil)
- end
+ %i{shell_out shell_out!}.each do |method|
+ stubbed_method = (method == :shell_out) ? :shell_out_compacted : :shell_out_compacted!
+ it "#{method} defaults to 900 seconds" do
+ expect(provider).to receive(stubbed_method).with("foo", timeout: 900)
+ provider.send(method, "foo")
+ end
+ it "#{method} overrides the default timeout with its options" do
+ expect(provider).to receive(stubbed_method).with("foo", timeout: 1)
+ provider.send(method, "foo", timeout: 1)
+ end
+ it "#{method} overrides the new_resource.timeout with the timeout option" do
+ new_resource.timeout(99)
+ expect(provider).to receive(stubbed_method).with("foo", timeout: 1)
+ provider.send(method, "foo", timeout: 1)
+ end
+ it "#{method} defaults to 900 seconds and preserves options" do
+ expect(provider).to receive(stubbed_method).with("foo", env: nil, timeout: 900)
+ provider.send(method, "foo", env: nil)
+ end
+ it "#{method} overrides the default timeout with its options and preserves options" do
+ expect(provider).to receive(stubbed_method).with("foo", timeout: 1, env: nil)
+ provider.send(method, "foo", timeout: 1, env: nil)
+ end
+ it "#{method} overrides the new_resource.timeout with the timeout option and preseves options" do
+ new_resource.timeout(99)
+ expect(provider).to receive(stubbed_method).with("foo", timeout: 1, env: nil)
+ provider.send(method, "foo", timeout: 1, env: nil)
end
end
end