Sha256: f05e9e392f770a72e9797b9cf467d4fbfd944d301ec032eab6a2d9b1d94966c4
Contents?: true
Size: 912 Bytes
Versions: 3
Compression:
Stored size: 912 Bytes
Contents
require 'spec_helper' describe Astrails::Safe::Pgdump do def def_config { :options => "OPTS", :user => "User", :password => "pwd", :host => "localhost", :port => 7777, :skip_tables => [:bar, :baz] } end def pgdump(id = :foo, config = def_config) Astrails::Safe::Pgdump.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 @pg = pgdump end { :id => "foo", :kind => "pgdump", :extension => ".sql", :filename => "pgdump-foo.NOW", :command => "pg_dump OPTS --username='User' --host='localhost' --port='7777' foo", }.each do |k, v| it "should set #{k} to #{v}" do @pg.backup.send(k).should == v end end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
akupchanko-astrails-safe-0.3.1 | spec/astrails/safe/pgdump_spec.rb |
astrails-safe-0.3.1 | spec/unit/pgdump_spec.rb |
astrails-safe-0.3.0 | spec/unit/pgdump_spec.rb |