diff options
author | Hunter Haugen <h.haugen@gmail.com> | 2013-07-30 09:51:37 -0700 |
---|---|---|
committer | Hunter Haugen <h.haugen@gmail.com> | 2013-07-30 09:51:37 -0700 |
commit | 6f7507a2a48ff0a58c7db026760a2eb84e382a77 (patch) | |
tree | 79c3760635cf6defe29be5238f4456aa6c58c280 /spec/unit/puppet | |
parent | 45cb7c1319e79cbfb3ff2bcdadfc275260d557e0 (diff) | |
parent | a14da4fc175649adaa2aa2a37465e5cd3fc7fccb (diff) |
Merge pull request #84 from sodabrew/issue_12034_svnswitch
added support for changing upstream repo url - rebase of #74
Diffstat (limited to 'spec/unit/puppet')
-rw-r--r-- | spec/unit/puppet/provider/vcsrepo/svn_spec.rb | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/spec/unit/puppet/provider/vcsrepo/svn_spec.rb b/spec/unit/puppet/provider/vcsrepo/svn_spec.rb index a533b7c..675fc0b 100644 --- a/spec/unit/puppet/provider/vcsrepo/svn_spec.rb +++ b/spec/unit/puppet/provider/vcsrepo/svn_spec.rb @@ -69,10 +69,25 @@ describe_provider :vcsrepo, :svn, :resource => {:path => '/tmp/vcsrepo'} do before do @revision = '30' end - it "should use 'svn update'" do - expects_chdir - provider.expects(:svn).with('--non-interactive', 'update', '-r', @revision) - provider.revision = @revision + 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 + 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 |