Sha256: a287aa52ab58abc8ca881150c640d9572e6f98b99f657ca9ad47bcd5b53224ba

Contents?: true

Size: 532 Bytes

Versions: 7

Compression:

Stored size: 532 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe SQL::Generator::Literal, '#visit_date' do
  subject { object.visit_date(date) }

  let(:described_class) { Class.new(SQL::Generator::Visitor) { include SQL::Generator::Literal } }
  let(:date)            { Date.new(2010, 12, 31).freeze                                          }
  let(:object)          { described_class.new                                                    }

  it_should_behave_like 'a generated SQL expression'

  its(:to_s) { should eql("'2010-12-31'") }
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
axiom-sql-generator-0.2.0 spec/unit/axiom/sql/generator/literal/visit_date_spec.rb
axiom-sql-generator-0.1.0 spec/unit/axiom/sql/generator/literal/visit_date_spec.rb
veritas-sql-generator-0.0.7 spec/unit/veritas/sql/generator/literal/visit_date_spec.rb
veritas-sql-generator-0.0.6 spec/unit/veritas/sql/generator/literal/visit_date_spec.rb
veritas-sql-generator-0.0.5 spec/unit/veritas/sql/generator/literal/visit_date_spec.rb
veritas-sql-generator-0.0.4 spec/unit/veritas/sql/generator/literal/visit_date_spec.rb
veritas-sql-generator-0.0.3 spec/unit/veritas/sql/generator/literal/visit_date_spec.rb