summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-03-17 19:02:26 -0700
committerTim Smith <tsmith@chef.io>2018-03-17 19:02:26 -0700
commit33d7ad4d680b3f29a2a24848c074da84f1c25eb6 (patch)
treec2a50d1cab5ae0c128086b3fa54789217b958b0a /spec
parente2eaa3fdcd9a5e2f46d90f799eedcd86cc41eb6a (diff)
downloadchef-33d7ad4d680b3f29a2a24848c074da84f1c25eb6.tar.gz
Move subversion specific properties from scm to subversionscm_subversion
We actually set the defaults for these in the subversion property, but the actual properties are in scm. Move them to subversion since they are subversion specific. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/resource/scm_spec.rb11
-rw-r--r--spec/unit/resource/subversion_spec.rb12
2 files changed, 12 insertions, 11 deletions
diff --git a/spec/unit/resource/scm_spec.rb b/spec/unit/resource/scm_spec.rb
index cffc956960..33c2f17498 100644
--- a/spec/unit/resource/scm_spec.rb
+++ b/spec/unit/resource/scm_spec.rb
@@ -80,17 +80,6 @@ describe Chef::Resource::Scm do
expect(resource.svn_password).to eql("taftplz")
end
- it "has a svn_arguments String attribute" do
- resource.svn_arguments "--more-taft plz"
- expect(resource.svn_arguments).to eql("--more-taft plz")
- end
-
- it "has a svn_info_args String attribute" do
- expect(resource.svn_info_args).to be_nil
- resource.svn_info_args("--no-moar-plaintext-creds yep")
- expect(resource.svn_info_args).to eq("--no-moar-plaintext-creds yep")
- end
-
it "takes the depth as an integer for shallow clones" do
resource.depth 5
expect(resource.depth).to eq(5)
diff --git a/spec/unit/resource/subversion_spec.rb b/spec/unit/resource/subversion_spec.rb
index 2b86587f1a..dd6526e3dc 100644
--- a/spec/unit/resource/subversion_spec.rb
+++ b/spec/unit/resource/subversion_spec.rb
@@ -65,6 +65,18 @@ describe Chef::Resource::Subversion do
expect(resource.svn_arguments).to be_nil
end
+ it "has a svn_arguments String attribute" do
+ expect(resource.svn_arguments).to eq("--no-auth-cache") # the default
+ resource.svn_arguments "--more-taft plz"
+ expect(resource.svn_arguments).to eql("--more-taft plz")
+ end
+
+ it "has a svn_info_args String attribute" do
+ expect(resource.svn_info_args).to eq("--no-auth-cache") # the default
+ resource.svn_info_args("--no-moar-plaintext-creds yep")
+ expect(resource.svn_info_args).to eq("--no-moar-plaintext-creds yep")
+ end
+
it "hides password from custom exception message" do
resource.svn_password "l33th4x0rpa$$w0rd"
e = resource.customize_exception(Chef::Exceptions::Exec.new "Exception with password #{resource.svn_password}")