aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema_dumper_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-11-14 03:32:16 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-11-14 03:32:16 +0000
commit50ee332c4aa97aa797e814d3ab6ae63a0f8351e2 (patch)
tree7db87a169801a47875bfb8b7e6046df74ef9df92 /activerecord/test/schema_dumper_test.rb
parentfda4330ce9be60c4bd7434ea613543a1c378852b (diff)
downloadrails-50ee332c4aa97aa797e814d3ab6ae63a0f8351e2.tar.gz
rails-50ee332c4aa97aa797e814d3ab6ae63a0f8351e2.tar.bz2
rails-50ee332c4aa97aa797e814d3ab6ae63a0f8351e2.zip
Cleanup SQLite AUTOINCREMENT: exclude sqlite_sequence table, factor out feature availability check.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5520 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/schema_dumper_test.rb')
-rw-r--r--activerecord/test/schema_dumper_test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/test/schema_dumper_test.rb b/activerecord/test/schema_dumper_test.rb
index 016f66077d..8cbcbb39e5 100644
--- a/activerecord/test/schema_dumper_test.rb
+++ b/activerecord/test/schema_dumper_test.rb
@@ -8,7 +8,6 @@ if ActiveRecord::Base.connection.respond_to?(:tables)
def standard_dump
stream = StringIO.new
ActiveRecord::SchemaDumper.ignore_tables = []
- ActiveRecord::SchemaDumper.ignore_tables << /^sqlite_/ if current_adapter?(:SQLiteAdapter)
ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, stream)
stream.string
end
@@ -20,6 +19,11 @@ if ActiveRecord::Base.connection.respond_to?(:tables)
assert_no_match %r{create_table "schema_info"}, output
end
+ def test_schema_dump_excludes_sqlite_sequence
+ output = standard_dump
+ assert_no_match %r{create_table "sqlite_sequence"}, output
+ end
+
def assert_line_up(lines, pattern, required = false)
return assert(true) if lines.empty?
matches = lines.map { |line| line.match(pattern) }