Sha256: 9437ff0788c060e67f72c97996822e0a55a3001a427bb4e628ccc246ac1861ab

Contents?: true

Size: 625 Bytes

Versions: 4

Compression:

Stored size: 625 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe SQL::Generator::Function::String, '#visit_veritas_function_string_length' do
  subject { object.visit_veritas_function_string_length(length) }

  let(:described_class) { Class.new(SQL::Generator::Visitor) { include SQL::Generator::Function::String } }
  let(:length)          { Attribute::String.new(:name).length                                             }
  let(:object)          { described_class.new                                                             }

  it_should_behave_like 'a generated SQL expression'

  its(:to_s) { should eql('LENGTH ("name")') }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
veritas-sql-generator-0.0.7 spec/unit/veritas/sql/generator/function/string/visit_veritas_function_string_length_spec.rb
veritas-sql-generator-0.0.6 spec/unit/veritas/sql/generator/function/string/visit_veritas_function_string_length_spec.rb
veritas-sql-generator-0.0.5 spec/unit/veritas/sql/generator/function/string/visit_veritas_function_string_length_spec.rb
veritas-sql-generator-0.0.4 spec/unit/veritas/sql/generator/function/string/visit_veritas_function_string_length_spec.rb