diff options
Diffstat (limited to 'spec/unit/file_bucket/dipper_spec.rb')
-rwxr-xr-x | spec/unit/file_bucket/dipper_spec.rb | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/spec/unit/file_bucket/dipper_spec.rb b/spec/unit/file_bucket/dipper_spec.rb index 06ed16c4d..08ca79cfd 100755 --- a/spec/unit/file_bucket/dipper_spec.rb +++ b/spec/unit/file_bucket/dipper_spec.rb @@ -37,9 +37,12 @@ describe Puppet::FileBucket::Dipper do bucketfile.stubs(:checksum_data).returns("DIGEST123") bucketfile.expects(:save).with('md5/DIGEST123') - Puppet::FileBucket::File.stubs(:new).with( + + Puppet::FileBucket::File.stubs(:new).with( + "my contents", :bucket_path => '/my/bucket', + :path => '/my/file' ).returns(bucketfile) @@ -65,8 +68,11 @@ describe Puppet::FileBucket::Dipper do end it "should backup files to a remote server" do - @dipper = Puppet::FileBucket::Dipper.new( + + @dipper = Puppet::FileBucket::Dipper.new( + :Server => "puppetmaster", + :Port => "31337" ) @@ -78,9 +84,12 @@ describe Puppet::FileBucket::Dipper do bucketfile.stubs(:checksum_data).returns("DIGEST123") bucketfile.expects(:save).with('https://puppetmaster:31337/production/file_bucket_file/md5/DIGEST123') - Puppet::FileBucket::File.stubs(:new).with( + + Puppet::FileBucket::File.stubs(:new).with( + "my contents", :bucket_path => nil, + :path => '/my/file' ).returns(bucketfile) @@ -88,8 +97,11 @@ describe Puppet::FileBucket::Dipper do end it "should retrieve files from a remote server" do - @dipper = Puppet::FileBucket::Dipper.new( + + @dipper = Puppet::FileBucket::Dipper.new( + :Server => "puppetmaster", + :Port => "31337" ) |