diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-09 17:12:29 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-09 17:12:29 -0700 |
commit | 1e1af8f612ce5649f529fd2dcb573c9b42b455ad (patch) | |
tree | 2962be70feb3ce926fe54da7bee794f53cf2bbee /activerecord/test/cases | |
parent | 2f04c8785540597b02a265324c91267f09ddd07c (diff) | |
download | rails-1e1af8f612ce5649f529fd2dcb573c9b42b455ad.tar.gz rails-1e1af8f612ce5649f529fd2dcb573c9b42b455ad.tar.bz2 rails-1e1af8f612ce5649f529fd2dcb573c9b42b455ad.zip |
adding more behavioral tests for the sqlite adapter
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/adapters/sqlite/sqlite_adapter_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/sqlite/sqlite_adapter_test.rb b/activerecord/test/cases/adapters/sqlite/sqlite_adapter_test.rb index 69cfb00faf..2505372b7e 100644 --- a/activerecord/test/cases/adapters/sqlite/sqlite_adapter_test.rb +++ b/activerecord/test/cases/adapters/sqlite/sqlite_adapter_test.rb @@ -83,6 +83,26 @@ module ActiveRecord assert_equal 0, @ctx.select_rows(count_sql).first.first end + def test_tables + assert_equal %w{ items }, @ctx.tables + + @ctx.execute <<-eosql + CREATE TABLE people ( + id integer PRIMARY KEY AUTOINCREMENT, + number integer + ) + eosql + assert_equal %w{ items people }.sort, @ctx.tables.sort + end + + def test_tables_logs_name + name = "hello" + assert_logged [[name]] do + @ctx.tables(name) + assert_not_nil @ctx.logged.first.shift + end + end + def assert_logged logs @ctx.extend(Module.new { attr_reader :logged |