Sha256: 5d0c24993306730448af1ce330d8a057c3579b0f7df9695cb756a29f1c2b03ad

Contents?: true

Size: 883 Bytes

Versions: 4

Compression:

Stored size: 883 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe SQL::Generator::Function::Connective, '#visit_veritas_function_connective_conjunction' do
  subject { object.visit_veritas_function_connective_conjunction(conjunction) }

  let(:described_class) { Class.new(SQL::Generator::Visitor) { include SQL::Generator::Function::Connective } }
  let(:attribute)       { Attribute::Integer.new(:id)                                                         }
  let(:conjunction)     { attribute.eq(1).and(attribute.ne(2))                                                }
  let(:object)          { described_class.new                                                                 }

  before do
    described_class.class_eval { include SQL::Generator::Function::Predicate }
  end

  it_should_behave_like 'a generated SQL expression'

  its(:to_s) { should eql('("id" = 1 AND "id" <> 2)') }
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/connective/visit_veritas_function_connective_conjunction_spec.rb
veritas-sql-generator-0.0.6 spec/unit/veritas/sql/generator/function/connective/visit_veritas_function_connective_conjunction_spec.rb
veritas-sql-generator-0.0.5 spec/unit/veritas/sql/generator/function/connective/visit_veritas_function_connective_conjunction_spec.rb
veritas-sql-generator-0.0.4 spec/unit/veritas/sql/generator/function/connective/visit_veritas_function_connective_conjunction_spec.rb