@@ -68,28 +68,22 @@ def setup
6868 should 'have correct simplified types' do
6969 assert_equal :string , @char . type
7070 assert_equal :string , @char10 . type
71- if sqlserver_2005? || sqlserver_2008?
72- assert_equal :text , @varcharmax . type , @varcharmax . inspect
73- assert_equal :text , @varcharmax10 . type , @varcharmax10 . inspect
74- end
71+ assert_equal :text , @varcharmax . type , @varcharmax . inspect
72+ assert_equal :text , @varcharmax10 . type , @varcharmax10 . inspect
7573 end
7674
7775 should 'have correct #sql_type per schema definition' do
7876 assert_equal 'char(1)' , @char . sql_type , 'Specifing a char type with no limit is 1 by SQL Server standards.'
7977 assert_equal 'char(10)' , @char10 . sql_type , @char10 . inspect
80- if sqlserver_2005? || sqlserver_2008?
81- assert_equal 'varchar(max)' , @varcharmax . sql_type , 'A -1 limit should be converted to max (max) type.'
82- assert_equal 'varchar(max)' , @varcharmax10 . sql_type , 'A -1 limit should be converted to max (max) type.'
83- end
78+ assert_equal 'varchar(max)' , @varcharmax . sql_type , 'A -1 limit should be converted to max (max) type.'
79+ assert_equal 'varchar(max)' , @varcharmax10 . sql_type , 'A -1 limit should be converted to max (max) type.'
8480 end
8581
8682 should 'have correct #limit per schema definition' do
8783 assert_equal 1 , @char . limit
8884 assert_equal 10 , @char10 . limit
89- if sqlserver_2005? || sqlserver_2008?
90- assert_equal nil , @varcharmax . limit , 'Limits on max types are moot and we should let rails know that.'
91- assert_equal nil , @varcharmax10 . limit , 'Limits on max types are moot and we should let rails know that.'
92- end
85+ assert_equal nil , @varcharmax . limit , 'Limits on max types are moot and we should let rails know that.'
86+ assert_equal nil , @varcharmax10 . limit , 'Limits on max types are moot and we should let rails know that.'
9387 end
9488
9589 end
@@ -121,10 +115,8 @@ def setup
121115 assert_equal :text , @ntext10 . type
122116 assert_equal :string , @nchar10 . type
123117 assert_equal :string , @nvarchar100 . type
124- if sqlserver_2005? || sqlserver_2008?
125- assert_equal :text , @nvarcharmax . type , @nvarcharmax . inspect
126- assert_equal :text , @nvarcharmax10 . type , @nvarcharmax10 . inspect
127- end
118+ assert_equal :text , @nvarcharmax . type , @nvarcharmax . inspect
119+ assert_equal :text , @nvarcharmax10 . type , @nvarcharmax10 . inspect
128120 end
129121
130122 should 'have correct #sql_type per schema definition' do
@@ -134,10 +126,8 @@ def setup
134126 assert_equal 'ntext' , @ntext10 . sql_type , 'Even a next with a limit of 10 specified will mean nothing.'
135127 assert_equal 'nchar(10)' , @nchar10 . sql_type , 'An nchar with a limit of 10 needs to have it show up here.'
136128 assert_equal 'nvarchar(100)' , @nvarchar100 . sql_type , 'An nvarchar with a specified limit of 100 needs to show it.'
137- if sqlserver_2005? || sqlserver_2008?
138- assert_equal 'nvarchar(max)' , @nvarcharmax . sql_type , 'A -1 limit should be converted to max (max) type.'
139- assert_equal 'nvarchar(max)' , @nvarcharmax10 . sql_type , 'A -1 limit should be converted to max (max) type.'
140- end
129+ assert_equal 'nvarchar(max)' , @nvarcharmax . sql_type , 'A -1 limit should be converted to max (max) type.'
130+ assert_equal 'nvarchar(max)' , @nvarcharmax10 . sql_type , 'A -1 limit should be converted to max (max) type.'
141131 end
142132
143133 should 'have correct #limit per schema definition' do
@@ -146,10 +136,8 @@ def setup
146136 assert_equal nil , @ntext . limit , 'An ntext column limit is moot, it is a fixed variable length'
147137 assert_equal 10 , @nchar10 . limit
148138 assert_equal 100 , @nvarchar100 . limit
149- if sqlserver_2005? || sqlserver_2008?
150- assert_equal nil , @nvarcharmax . limit , 'Limits on max types are moot and we should let rails know that.'
151- assert_equal nil , @nvarcharmax10 . limit , 'Limits on max types are moot and we should let rails know that.'
152- end
139+ assert_equal nil , @nvarcharmax . limit , 'Limits on max types are moot and we should let rails know that.'
140+ assert_equal nil , @nvarcharmax10 . limit , 'Limits on max types are moot and we should let rails know that.'
153141 end
154142
155143 end
@@ -169,7 +157,7 @@ def setup
169157
170158 should 'use correct #sql_type for different sql server versions' do
171159 assert_equal 'datetime' , @datetime . sql_type
172- if sqlserver_2000? || sqlserver_2005?
160+ if sqlserver_2005?
173161 assert_equal 'datetime' , @date . sql_type
174162 assert_equal 'datetime' , @time . sql_type
175163 else
0 commit comments