Sha256: ea4130f1c2a27652859b2f2da6189fcafbb83c571ce6f0cb8b64b56f3a7be990

Contents?: true

Size: 903 Bytes

Versions: 11

Compression:

Stored size: 903 Bytes

Contents

describe 'Ridgepole::Client#dump' do
  context 'when there is a tables' do
    before { restore_tables_mysql_unknown_column_type }
    subject { client }

    it {
      expect(subject.dump).to match_fuzzy erbh(<<-ERB)
        create_table "clubs", <%= i cond('>= 5.1',id: :integer) %>, unsigned: true, force: :cascade do |t|
          t.string "name", default: "", null: false
          t.index ["name"], name: "idx_name", unique: true, <%= i cond(5.0, using: :btree) %>
        end
      ERB
    }

    it {
      expect(Ridgepole::Logger.instance).to receive(:warn).twice
      subject.dump
    }

    it {
      expect(Ridgepole::Logger.instance).to receive(:warn).with('[WARNING] Could not dump table "places" because of following StandardError')
      expect(Ridgepole::Logger.instance).to receive(:warn).with("   Unknown type 'geometry' for column 'location'")
      subject.dump
    }
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ridgepole-0.8.0.rc1 spec/mysql/dump/dump_unknown_column_type_spec.rb
ridgepole-0.7.7 spec/mysql/dump/dump_unknown_column_type_spec.rb
ridgepole-0.7.6 spec/mysql/dump/dump_unknown_column_type_spec.rb
ridgepole-0.7.5 spec/mysql/dump/dump_unknown_column_type_spec.rb
ridgepole-0.7.5.beta3 spec/mysql/dump/dump_unknown_column_type_spec.rb
ridgepole-0.7.5.beta2 spec/mysql/dump/dump_unknown_column_type_spec.rb
ridgepole-0.7.5.beta spec/mysql/dump/dump_unknown_column_type_spec.rb
ridgepole-0.7.4 spec/mysql/dump/dump_unknown_column_type_spec.rb
ridgepole-0.7.3 spec/mysql/dump/dump_unknown_column_type_spec.rb
ridgepole-0.7.3.beta3 spec/mysql/dump/dump_unknown_column_type_spec.rb
ridgepole-0.7.3.beta2 spec/mysql/dump/dump_unknown_column_type_spec.rb