Don't skip tests if they are not broken. Just don't define they

上级 99cdad6d
......@@ -33,9 +33,8 @@ def test_bad_connection
end
end
def test_connect_with_url
skip "can't establish new connection when using memory db" if in_memory_db?
begin
unless in_memory_db?
def test_connect_with_url
original_connection = ActiveRecord::Base.remove_connection
tf = Tempfile.open 'whatever'
url = "sqlite3://#{tf.path}"
......@@ -46,11 +45,8 @@ def test_connect_with_url
tf.unlink
ActiveRecord::Base.establish_connection(original_connection)
end
end
def test_connect_memory_with_url
skip "can't establish new connection when using memory db" if in_memory_db?
begin
def test_connect_memory_with_url
original_connection = ActiveRecord::Base.remove_connection
url = "sqlite3:///:memory:"
ActiveRecord::Base.establish_connection(url)
......
require "cases/helper"
if ActiveRecord::Base.connection.supports_migrations?
class EagerSingularizationTest < ActiveRecord::TestCase
class Virus < ActiveRecord::Base
belongs_to :octopus
......@@ -50,8 +51,6 @@ class Compress < ActiveRecord::Base
end
def setup
skip 'Does not support migrations' unless connection.supports_migrations?
connection.create_table :viri do |t|
t.column :octopus_id, :integer
t.column :species, :string
......@@ -146,3 +145,4 @@ def test_eager_no_extra_singularization_has_many_through_has_many
end
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册