diff options
author | kennyj <kennyj@gmail.com> | 2013-06-05 20:53:26 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2013-06-05 21:16:50 +0900 |
commit | 42d0d1832f3354dbbd61163c2bb9a7a50227d98b (patch) | |
tree | a7e0c18ea13b8b791ec28f8a89dc54c8cfc7be49 /activerecord/test | |
parent | 9c89b29138b02e257ab3c058744eb7f9970c759d (diff) | |
download | rails-42d0d1832f3354dbbd61163c2bb9a7a50227d98b.tar.gz rails-42d0d1832f3354dbbd61163c2bb9a7a50227d98b.tar.bz2 rails-42d0d1832f3354dbbd61163c2bb9a7a50227d98b.zip |
Remove OracleDatabaseTasks was deprecated, because this was provided by 3rd-party.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/tasks/oracle_rake_test.rb | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/activerecord/test/cases/tasks/oracle_rake_test.rb b/activerecord/test/cases/tasks/oracle_rake_test.rb deleted file mode 100644 index 5f840febbc..0000000000 --- a/activerecord/test/cases/tasks/oracle_rake_test.rb +++ /dev/null @@ -1,93 +0,0 @@ -require 'cases/helper' - -module ActiveRecord - module OracleSetupper - def setup - @database = 'db.oracle' - @connection = stub :connection - @configuration = { - 'adapter' => 'oracle', - 'database' => @database - } - ActiveRecord::Base.stubs(:connection).returns(@connection) - ActiveRecord::Base.stubs(:establish_connection).returns(true) - - @tasks = Class.new(ActiveRecord::Tasks::OracleDatabaseTasks) do - def initialize(configuration) - ActiveSupport::Deprecation.silence { super } - end - end - ActiveRecord::Tasks::DatabaseTasks.stubs(:class_for_adapter).returns(@tasks) unless defined? ActiveRecord::ConnectionAdapters::OracleAdapter - end - end - - class OracleDBCreateTest < ActiveRecord::TestCase - include OracleSetupper - - def test_db_retrieves_create - message = capture(:stderr) do - ActiveRecord::Tasks::DatabaseTasks.create @configuration - end - assert_match(/not supported/, message) - end - end - - class OracleDBDropTest < ActiveRecord::TestCase - include OracleSetupper - - def test_db_retrieves_drop - message = capture(:stderr) do - ActiveRecord::Tasks::DatabaseTasks.drop @configuration - end - assert_match(/not supported/, message) - end - end - - class OracleDBCharsetAndCollationTest < ActiveRecord::TestCase - include OracleSetupper - - def test_db_retrieves_collation - assert_raise NoMethodError do - ActiveRecord::Tasks::DatabaseTasks.collation @configuration - end - end - - def test_db_retrieves_charset - message = capture(:stderr) do - ActiveRecord::Tasks::DatabaseTasks.charset @configuration - end - assert_match(/not supported/, message) - end - end - - class OracleStructureDumpTest < ActiveRecord::TestCase - include OracleSetupper - - def setup - super - @connection.stubs(:structure_dump).returns("select sysdate from dual;") - end - - def test_structure_dump - filename = "oracle.sql" - ActiveRecord::Tasks::DatabaseTasks.structure_dump(@configuration, filename) - assert File.exists?(filename) - ensure - FileUtils.rm_f(filename) - end - end - - class OracleStructureLoadTest < ActiveRecord::TestCase - include OracleSetupper - - def test_structure_load - filename = "oracle.sql" - - open(filename, 'w') { |f| f.puts("select sysdate from dual;") } - @connection.stubs(:execute).with("select sysdate from dual;\n") - ActiveRecord::Tasks::DatabaseTasks.structure_load(@configuration, filename) - ensure - FileUtils.rm_f(filename) - end - end -end |