summaryrefslogtreecommitdiff
path: root/spec/unit/puppet/provider/vcsrepo/svn_spec.rb
diff options
context:
space:
mode:
authorAaron Stone <aaron@serendipity.cx>2013-07-25 09:24:51 -0700
committerAaron Stone <aaron@serendipity.cx>2013-07-25 13:57:42 -0700
commita14da4fc175649adaa2aa2a37465e5cd3fc7fccb (patch)
tree79c3760635cf6defe29be5238f4456aa6c58c280 /spec/unit/puppet/provider/vcsrepo/svn_spec.rb
parentc281f10efde83847f4df822010c32e03cda809b7 (diff)
Handle revision update without source switch.
Diffstat (limited to 'spec/unit/puppet/provider/vcsrepo/svn_spec.rb')
-rw-r--r--spec/unit/puppet/provider/vcsrepo/svn_spec.rb31
1 files changed, 22 insertions, 9 deletions
diff --git a/spec/unit/puppet/provider/vcsrepo/svn_spec.rb b/spec/unit/puppet/provider/vcsrepo/svn_spec.rb
index e7e25d7..675fc0b 100644
--- a/spec/unit/puppet/provider/vcsrepo/svn_spec.rb
+++ b/spec/unit/puppet/provider/vcsrepo/svn_spec.rb
@@ -66,16 +66,29 @@ describe_provider :vcsrepo, :svn, :resource => {:path => '/tmp/vcsrepo'} do
end
describe "setting the revision property" do
+ before do
+ @revision = '30'
+ end
+ resource_without :source do
+ it "should use 'svn update'" do
+ expects_chdir
+ provider.expects(:svn).with('--non-interactive', 'update', '-r', @revision)
+ provider.revision = @revision
+ end
+ end
+ end
+
+ describe "setting the revision property and repo source" do
+ before do
+ @revision = '30'
+ end
resource_with :source do
- before do
- @revision = '30'
- end
- it "should use 'svn switch'" do
- expects_chdir
- provider.expects(:svn).with('--non-interactive', 'switch', '-r', @revision, 'an-unimportant-value')
- provider.revision = @revision
- end
- end
+ it "should use 'svn switch'" do
+ expects_chdir
+ provider.expects(:svn).with('--non-interactive', 'switch', '-r', @revision, 'an-unimportant-value')
+ provider.revision = @revision
+ end
+ end
end
end