diff options
Diffstat (limited to 'activerecord/test/cases/tasks')
-rw-r--r-- | activerecord/test/cases/tasks/mysql_rake_test.rb | 4 | ||||
-rw-r--r-- | activerecord/test/cases/tasks/postgresql_rake_test.rb | 8 | ||||
-rw-r--r-- | activerecord/test/cases/tasks/sqlite_rake_test.rb | 12 |
3 files changed, 6 insertions, 18 deletions
diff --git a/activerecord/test/cases/tasks/mysql_rake_test.rb b/activerecord/test/cases/tasks/mysql_rake_test.rb index 75adbb70e8..7bf902681e 100644 --- a/activerecord/test/cases/tasks/mysql_rake_test.rb +++ b/activerecord/test/cases/tasks/mysql_rake_test.rb @@ -62,9 +62,7 @@ module ActiveRecord ActiveRecord::StatementInvalid.new("Can't create database 'dev'; database exists:") ) - assert_raises(ActiveRecord::Tasks::DatabaseAlreadyExists) do - ActiveRecord::Tasks::DatabaseTasks.create @configuration - end + ActiveRecord::Tasks::DatabaseTasks.create @configuration end end diff --git a/activerecord/test/cases/tasks/postgresql_rake_test.rb b/activerecord/test/cases/tasks/postgresql_rake_test.rb index c01c6de593..43a474e59b 100644 --- a/activerecord/test/cases/tasks/postgresql_rake_test.rb +++ b/activerecord/test/cases/tasks/postgresql_rake_test.rb @@ -60,9 +60,7 @@ module ActiveRecord $stderr.expects(:puts). with("Couldn't create database for #{@configuration.inspect}") - assert_raises(Exception) do - ActiveRecord::Tasks::DatabaseTasks.create @configuration - end + ActiveRecord::Tasks::DatabaseTasks.create @configuration end def test_create_when_database_exists_outputs_info_to_stderr @@ -72,9 +70,7 @@ module ActiveRecord ActiveRecord::StatementInvalid.new('database "my-app-db" already exists') ) - assert_raises(ActiveRecord::Tasks::DatabaseAlreadyExists) do - ActiveRecord::Tasks::DatabaseTasks.create @configuration - end + ActiveRecord::Tasks::DatabaseTasks.create @configuration end end diff --git a/activerecord/test/cases/tasks/sqlite_rake_test.rb b/activerecord/test/cases/tasks/sqlite_rake_test.rb index 102bddf6a6..826855ef38 100644 --- a/activerecord/test/cases/tasks/sqlite_rake_test.rb +++ b/activerecord/test/cases/tasks/sqlite_rake_test.rb @@ -28,9 +28,7 @@ module ActiveRecord $stderr.expects(:puts).with("#{@database} already exists") - assert_raises(ActiveRecord::Tasks::DatabaseAlreadyExists) do - ActiveRecord::Tasks::DatabaseTasks.create @configuration, '/rails/root' - end + ActiveRecord::Tasks::DatabaseTasks.create @configuration, '/rails/root' end def test_db_create_with_file_does_nothing @@ -39,9 +37,7 @@ module ActiveRecord ActiveRecord::Base.expects(:establish_connection).never - assert_raises(ActiveRecord::Tasks::DatabaseAlreadyExists) do - ActiveRecord::Tasks::DatabaseTasks.create @configuration, '/rails/root' - end + ActiveRecord::Tasks::DatabaseTasks.create @configuration, '/rails/root' end def test_db_create_establishes_a_connection @@ -57,9 +53,7 @@ module ActiveRecord $stderr.expects(:puts). with("Couldn't create database for #{@configuration.inspect}") - assert_raises(Exception) do - ActiveRecord::Tasks::DatabaseTasks.create @configuration, '/rails/root' - end + ActiveRecord::Tasks::DatabaseTasks.create @configuration, '/rails/root' end end |