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.6.8 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.6.7 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.6.6 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.6.5 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.6.4 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.6.3 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.6.2 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.6.1 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.6.0 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.5.21 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.5.20 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.5.17 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.5.16 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.5.15 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.5.14 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.5.13 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.5.12 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.5.11 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.5.10 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb
flydata-0.5.9 flydata-core/spec/table_def/autoload_redshift_table_def_spec.rb