summaryrefslogtreecommitdiff
path: root/spec/unit/util/powershell/ps_credential_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/util/powershell/ps_credential_spec.rb')
-rw-r--r--spec/unit/util/powershell/ps_credential_spec.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/unit/util/powershell/ps_credential_spec.rb b/spec/unit/util/powershell/ps_credential_spec.rb
index 668ec525c6..2ec7ff6238 100644
--- a/spec/unit/util/powershell/ps_credential_spec.rb
+++ b/spec/unit/util/powershell/ps_credential_spec.rb
@@ -16,27 +16,27 @@
# limitations under the License.
#
-require 'chef'
-require 'chef/util/powershell/ps_credential'
+require "chef"
+require "chef/util/powershell/ps_credential"
describe Chef::Util::Powershell::PSCredential do
- let (:username) { 'foo' }
- let (:password) { 'ThIsIsThEpAsSwOrD' }
+ let (:username) { "foo" }
+ let (:password) { "ThIsIsThEpAsSwOrD" }
- context 'when username and password are provided' do
+ context "when username and password are provided" do
let(:ps_credential) { Chef::Util::Powershell::PSCredential.new(username, password)}
- context 'when calling to_psobject' do
- it 'should create the script to create a PSCredential when calling' do
- allow(ps_credential).to receive(:encrypt).with(password).and_return('encrypted')
+ context "when calling to_psobject" do
+ it "should create the script to create a PSCredential when calling" do
+ allow(ps_credential).to receive(:encrypt).with(password).and_return("encrypted")
expect(ps_credential.to_psobject).to eq(
"New-Object System.Management.Automation.PSCredential("\
"'#{username}',('encrypted' | ConvertTo-SecureString))")
end
end
- context 'when to_text is called' do
- it 'should not contain the password' do
- allow(ps_credential).to receive(:encrypt).with(password).and_return('encrypted')
+ context "when to_text is called" do
+ it "should not contain the password" do
+ allow(ps_credential).to receive(:encrypt).with(password).and_return("encrypted")
expect(ps_credential.to_text).not_to match(/#{password}/)
end
end