Sha256: b867cbbf62ed8e66ab18c783ab3299537639a849c3e74d293afe90f62ff051b0
Contents?: true
Size: 439 Bytes
Versions: 97
Compression:
Stored size: 439 Bytes
Contents
require 'abstract_unit' require 'fixtures/topic' class TestColumnAlias < Test::Unit::TestCase fixtures :topics QUERY = if 'Oracle' == ActiveRecord::Base.connection.adapter_name 'SELECT id AS pk FROM topics WHERE ROWNUM < 2' else 'SELECT id AS pk FROM topics' end def test_column_alias records = Topic.connection.select_all(QUERY) assert_equal 'pk', records[0].keys[0] end end
Version data entries
97 entries across 97 versions & 7 rubygems