summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-09-07 14:37:50 -0700
committerTim Smith <tsmith@chef.io>2018-09-07 14:37:50 -0700
commit94950242ab21af1b046518adac53b908311d7354 (patch)
treed9f550e023a9f64b72d1a382eb2c7c1fa37c54a4 /spec
parent67e6a0572261f42e0d58d6079fbe2933744e8aaf (diff)
downloadchef-powershell.tar.gz
Properly capitalize PowerShell in descriptions and errorspowershell
It's PowerShell not Powershell. Our docs site had already been updated. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec')
-rw-r--r--spec/functional/resource/dsc_resource_spec.rb6
-rw-r--r--spec/functional/resource/powershell_script_spec.rb4
-rw-r--r--spec/functional/win32/crypto_spec.rb2
-rw-r--r--spec/unit/platform/query_helpers_spec.rb8
-rw-r--r--spec/unit/provider/dsc_resource_spec.rb4
-rw-r--r--spec/unit/provider/dsc_script_spec.rb2
-rw-r--r--spec/unit/resource/dsc_resource_spec.rb2
7 files changed, 14 insertions, 14 deletions
diff --git a/spec/functional/resource/dsc_resource_spec.rb b/spec/functional/resource/dsc_resource_spec.rb
index bb3cf2157d..3491bb6bbe 100644
--- a/spec/functional/resource/dsc_resource_spec.rb
+++ b/spec/functional/resource/dsc_resource_spec.rb
@@ -33,11 +33,11 @@ describe Chef::Resource::DscResource, :windows_powershell_dsc_only do
Chef::Resource::DscResource.new("dsc_resource_test", run_context)
end
- context "when Powershell does not support Invoke-DscResource"
- context "when Powershell supports Invoke-DscResource" do
+ context "when PowerShell does not support Invoke-DscResource"
+ context "when PowerShell supports Invoke-DscResource" do
before do
if !Chef::Platform.supports_dsc_invoke_resource?(node)
- skip "Requires Powershell >= 5.0.10018.0"
+ skip "Requires PowerShell >= 5.0.10018.0"
elsif !Chef::Platform.supports_refresh_mode_enabled?(node) && !Chef::Platform.dsc_refresh_mode_disabled?(node)
skip "Requires LCM RefreshMode is Disabled"
end
diff --git a/spec/functional/resource/powershell_script_spec.rb b/spec/functional/resource/powershell_script_spec.rb
index cc1bd8fd1c..e4c96976d9 100644
--- a/spec/functional/resource/powershell_script_spec.rb
+++ b/spec/functional/resource/powershell_script_spec.rb
@@ -42,7 +42,7 @@ describe Chef::Resource::WindowsScript::PowershellScript, :windows_only do
let(:valid_powershell_interpreter_flag) { "-Sta" }
let!(:resource) do
- r = Chef::Resource::WindowsScript::PowershellScript.new("Powershell resource functional test", @run_context)
+ r = Chef::Resource::WindowsScript::PowershellScript.new("PowerShell resource functional test", @run_context)
r.code(successful_executable_script_content)
r
end
@@ -154,7 +154,7 @@ describe Chef::Resource::WindowsScript::PowershellScript, :windows_only do
# This somewhat ambiguous case, two failures of different types,
# seems to violate the principle of returning the status of the
# last line executed -- in this case, we return the status of the
- # second to last line. This happens because Powershell gives no
+ # second to last line. This happens because PowerShell gives no
# way for us to determine whether the last operation was a cmdlet
# or Windows process. Because the latter gives more specific
# errors than 0 or 1, we return that instead, which is acceptable
diff --git a/spec/functional/win32/crypto_spec.rb b/spec/functional/win32/crypto_spec.rb
index 5fcbca02b6..70d3f42cfb 100644
--- a/spec/functional/win32/crypto_spec.rb
+++ b/spec/functional/win32/crypto_spec.rb
@@ -36,7 +36,7 @@ describe "Chef::ReservedNames::Win32::Crypto", :windows_only do
it "can be decrypted by powershell" do
encrypted = Chef::ReservedNames::Win32::Crypto.encrypt(plaintext)
- resource = Chef::Resource::WindowsScript::PowershellScript.new("Powershell resource functional test", @run_context)
+ resource = Chef::Resource::WindowsScript::PowershellScript.new("PowerShell resource functional test", @run_context)
resource.code <<~EOF
$encrypted = '#{encrypted}' | ConvertTo-SecureString
$BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($encrypted)
diff --git a/spec/unit/platform/query_helpers_spec.rb b/spec/unit/platform/query_helpers_spec.rb
index 82ed4de9c6..22bfd150ee 100644
--- a/spec/unit/platform/query_helpers_spec.rb
+++ b/spec/unit/platform/query_helpers_spec.rb
@@ -139,13 +139,13 @@ describe "Chef::Platform#supports_msi?" do
end
describe "Chef::Platform#supports_dsc?" do
- it "returns false if powershell is not present" do
+ it "returns false if PowerShell is not present" do
node = Chef::Node.new
expect(Chef::Platform.supports_dsc?(node)).to be_falsey
end
["1.0", "2.0", "3.0"].each do |version|
- it "returns false for Powershell #{version}" do
+ it "returns false for PowerShell #{version}" do
node = Chef::Node.new
node.automatic[:languages][:powershell][:version] = version
expect(Chef::Platform.supports_dsc?(node)).to be_falsey
@@ -153,7 +153,7 @@ describe "Chef::Platform#supports_dsc?" do
end
["4.0", "5.0"].each do |version|
- it "returns true for Powershell #{version}" do
+ it "returns true for PowerShell #{version}" do
node = Chef::Node.new
node.automatic[:languages][:powershell][:version] = version
expect(Chef::Platform.supports_dsc?(node)).to be_truthy
@@ -168,7 +168,7 @@ describe "Chef::Platform#supports_dsc_invoke_resource?" do
end
["1.0", "2.0", "3.0", "4.0", "5.0.10017.9"].each do |version|
- it "returns false for Powershell #{version}" do
+ it "returns false for PowerShell #{version}" do
node = Chef::Node.new
node.automatic[:languages][:powershell][:version] = version
expect(Chef::Platform.supports_dsc_invoke_resource?(node)).to be_falsey
diff --git a/spec/unit/provider/dsc_resource_spec.rb b/spec/unit/provider/dsc_resource_spec.rb
index 411dc50cc9..82ee5a40b3 100644
--- a/spec/unit/provider/dsc_resource_spec.rb
+++ b/spec/unit/provider/dsc_resource_spec.rb
@@ -27,7 +27,7 @@ describe Chef::Provider::DscResource do
Chef::Provider::DscResource.new(resource, run_context)
end
- context "when Powershell does not support Invoke-DscResource" do
+ context "when PowerShell does not support Invoke-DscResource" do
let (:node) do
node = Chef::Node.new
node.automatic[:languages][:powershell][:version] = "4.0"
@@ -40,7 +40,7 @@ describe Chef::Provider::DscResource do
end
end
- context "when Powershell supports Invoke-DscResource" do
+ context "when PowerShell supports Invoke-DscResource" do
context "when RefreshMode is not set to Disabled" do
context "and the WMF 5 is a preview release" do
diff --git a/spec/unit/provider/dsc_script_spec.rb b/spec/unit/provider/dsc_script_spec.rb
index 5f091b8813..c880683a0f 100644
--- a/spec/unit/provider/dsc_script_spec.rb
+++ b/spec/unit/provider/dsc_script_spec.rb
@@ -162,7 +162,7 @@ describe Chef::Provider::DscScript do
end
end
- it "raises an exception if Powershell is not present" do
+ it "raises an exception if PowerShell is not present" do
expect do
provider.run_action(:run)
end.to raise_error(Chef::Exceptions::ProviderNotFound)
diff --git a/spec/unit/resource/dsc_resource_spec.rb b/spec/unit/resource/dsc_resource_spec.rb
index 22c42aa441..04e1305163 100644
--- a/spec/unit/resource/dsc_resource_spec.rb
+++ b/spec/unit/resource/dsc_resource_spec.rb
@@ -93,7 +93,7 @@ describe Chef::Resource::DscResource do
end
end
- context "Powershell DSL methods" do
+ context "PowerShell DSL methods" do
it "responds to :ps_credential" do
expect(dsc_test_resource.respond_to?(:ps_credential)).to be true
end