Sha256: b63dcf53fc4660a5b00030c0cb867075193d8f4b4e781b3544545591ede1d8ff

Contents?: true

Size: 821 Bytes

Versions: 5

Compression:

Stored size: 821 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Astrails::Safe::Svndump do
  def def_config
    {
      :options => "OPTS",
      :repo_path => "bar/baz"
    }
  end

  def svndump(id = :foo, config = def_config)
    Astrails::Safe::Svndump.new(id, Astrails::Safe::Config::Node.new(nil, config))
  end

  before(:each) do
    stub(Time).now.stub!.strftime {"NOW"}
  end

  after(:each) { Astrails::Safe::TmpFile.cleanup }

  describe :backup do
    before(:each) do
      @svn = svndump
    end

    {
      :id => "foo",
      :kind => "svndump",
      :extension => ".svn",
      :filename => "svndump-foo.NOW",
      :command => "svnadmin dump OPTS bar/baz",
    }.each do |k, v|
      it "should set #{k} to #{v}" do
        @svn.backup.send(k).should == v
      end
    end

  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
netguru-safe-0.2.11 spec/unit/svndump_spec.rb
netguru-safe-0.2.10 spec/unit/svndump_spec.rb
netguru-safe-0.2.9 spec/unit/svndump_spec.rb
darkofabijan-astrails-safe-0.2.9 spec/unit/svndump_spec.rb
darkofabijan-astrails-safe-0.2.8 spec/unit/svndump_spec.rb