Skip to content

Commit 74638c9

Browse files
committed
Add a strange table name test. Does not fail. Closing #84
1 parent 983c26c commit 74638c9

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

test/cases/specific_schema_test_sqlserver.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ class SpecificSchemaTestSqlserver < ActiveRecord::TestCase
164164

165165
end
166166

167+
context 'with strange table names' do
168+
SqlServerDollarTableName.new.save
169+
SqlServerDollarTableName.limit(20).offset(1).all
170+
end
171+
167172
end
168173

169174

test/cases/sqlserver_helper.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ def set_new_id
5555
self[:guid_newid] ||= connection.newid_function if new_id_setting
5656
end
5757
end
58+
class SqlServerDollarTableName < ActiveRecord::Base
59+
self.table_name = 'my$strange_table'
60+
end
5861
class SqlServerChronic < ActiveRecord::Base
5962
coerce_sqlserver_date :date
6063
coerce_sqlserver_time :time

test/schema/sqlserver_specific_schema.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@
7272
create_table :sql_server_binary_types, :force => true do |t|
7373
# TODO: Add some different native binary types and test.
7474
end
75-
75+
76+
create_table 'my$strange_table', :force => true do |t|
77+
t.column :number, :real
78+
end
79+
7680
create_table :sql_server_edge_schemas, :force => true do |t|
7781
t.string :description
7882
t.column :bigint, :bigint

0 commit comments

Comments
 (0)