Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #195 from gregors/view_sys_mssql_2000

sql server 2000 doesn't contain a sys.view table - fix broken test
  • Loading branch information...
commit e49ec53fb369c5b664bcfc577e1bec84d45c0070 2 parents 895378b + 328c17e
@guilleiguaran guilleiguaran authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 test/mssql_ignore_system_views_test.rb
View
9 test/mssql_ignore_system_views_test.rb
@@ -8,8 +8,13 @@ class IgnoreSystemViewsTest < Test::Unit::TestCase
include MigrationSetup
def test_system_views_ignored
- assert_equal true, table_exists?("sys.views"), %{table_exists?("sys.views")}
- assert_equal true, table_exists?("information_schema.views"), %{table_exists?("information_schema.views")}
+ if ActiveRecord::Base.connection.sqlserver_version == "2000"
+ assert_equal false, table_exists?("sys.views"), %{table_exists?("sys.views")}
+ assert_equal false, table_exists?("information_schema.views"), %{table_exists?("information_schema.views")}
+ else
+ assert_equal true, table_exists?("sys.views"), %{table_exists?("sys.views")}
+ assert_equal true, table_exists?("information_schema.views"), %{table_exists?("information_schema.views")}
+ end
assert_equal false, table_exists?("dbo.views"), %{table_exists?("dbo.views")}
assert_equal false, table_exists?(:views), %{table_exists?(:views)}
ActiveRecord::Schema.define { suppress_messages { create_table :views } }
Please sign in to comment.
Something went wrong with that request. Please try again.