Sha256: 78f39d66a4572d1c5256244165d8893fe13889d737e91d69bed32fce6b01f7ed

Contents?: true

Size: 936 Bytes

Versions: 74

Compression:

Stored size: 936 Bytes

Contents

require 'spec_helper'
require 'flydata-core/table_def/autoload_redshift_table_def'

module FlydataCore
module TableDef

describe AutoloadRedshiftTableDef do
  describe '.convert_to_valid_name' do
    subject { described_class.convert_to_valid_name(key) }

    context "with a key that has special chars" do
      let(:key) { %q| !"#$%&'()*+,-/:;<=>?@[\\]^_{\|}~`| }
      let(:expected_value) { %q|____$___________________________| }

      it "Autoload only supports $ in a table/column name.  Other special characters are replaced with underscore (_)" do
        is_expected.to eq expected_value
      end
    end
    context "with a key that has a period in it" do
      let(:key) { %q|my.table| }
      let(:expected_value) { %q|my_table| }
      it "Autoload does not support period (.) in a table/column name.  It's replaced with an underscore (_)" do
        is_expected.to eq expected_value
      end
    end
  end
end

end
end

Version data entries

74 entries across 74 versions & 1 rubygems

Version Path
flydata-0.8.10.2 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.8.10.1 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.8.9.11 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.8.10 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.8.9 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.8.8 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.8.7 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.8.6 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.8.5 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.8.4 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.8.3 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.8.2 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.8.1 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.8.0 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.7.19 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.7.18 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.7.17 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.7.16 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.7.15 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.7.14 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb