Sha256: 6df50c4c972d84a062a72ca8b4e35bc0ea4e5ece919b18fa7d918c04b0c33d5f

Contents?: true

Size: 648 Bytes

Versions: 2

Compression:

Stored size: 648 Bytes

Contents

#
#  Copyright (c) 2011, SoundCloud Ltd., Rany Keddo, Tobias Bielohlawek, Tobias
#  Schmidt
#

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

require 'lhm/table'
require 'lhm/migration'

describe Lhm::Migration do
  include UnitHelper

  before(:each) do
    @start = Time.now
    @origin = Lhm::Table.new("origin")
    @destination = Lhm::Table.new("destination")
    @migration = Lhm::Migration.new(@origin, @destination, @start)
  end

  it "should name archive" do
    stamp = "%Y_%m_%d_%H_%M_%S_#{ "%03d" % (@start.usec / 1000) }"
    @migration.archive_name.must_equal "lhma_#{ @start.strftime(stamp) }_origin"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lhm-1.0.0.rc2 spec/unit/migration_spec.rb
lhm-1.0.0.rc.1 spec/unit/migration_spec.rb