diff options
| author | Dominic Cleal <dcleal@redhat.com> | 2011-02-25 22:22:04 +0000 |
|---|---|---|
| committer | Dominic Cleal <dcleal@redhat.com> | 2011-02-25 22:34:14 +0000 |
| commit | 0026e43ef99f411ac66e76b88bae2bf3c0cc3734 (patch) | |
| tree | 892650fff26cfafe45eb29f9c680612a2947c2e4 /spec/unit/provider/augeas | |
| parent | 67ed16031c6f1695a5b9933169b1f8ec1a4cce53 (diff) | |
| download | puppet-0026e43ef99f411ac66e76b88bae2bf3c0cc3734.tar.gz puppet-0026e43ef99f411ac66e76b88bae2bf3c0cc3734.tar.xz puppet-0026e43ef99f411ac66e76b88bae2bf3c0cc3734.zip | |
(#6494) Add mv command to Augeas provider
Moves the first node to the position of the second, deleting it and its
children if it already exists.
Diffstat (limited to 'spec/unit/provider/augeas')
| -rw-r--r-- | spec/unit/provider/augeas/augeas_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/provider/augeas/augeas_spec.rb b/spec/unit/provider/augeas/augeas_spec.rb index 3d53286ad..9f1007a8c 100644 --- a/spec/unit/provider/augeas/augeas_spec.rb +++ b/spec/unit/provider/augeas/augeas_spec.rb @@ -465,5 +465,15 @@ describe provider_class do @augeas.expects(:close) @provider.execute_changes.should == :executed end + + it "should handle mv commands" do + command = "mv Jar/Jar Binks" + context = "/foo/" + @resource.expects(:[]).times(2).returns(command).then.returns(context) + @augeas.expects(:mv).with("/foo/Jar/Jar", "/foo/Binks").returns(true) + @augeas.expects(:save).returns(true) + @augeas.expects(:close) + @provider.execute_changes.should == :executed + end end end |
