зеркало из https://github.com/github/github-ds.git
make sure `DS.reset` is run before every DS & KV test run
This commit is contained in:
Родитель
e8acbedb52
Коммит
f6dce69dd5
|
@ -1,13 +1,16 @@
|
|||
require "test_helper"
|
||||
|
||||
class GitHub::DSTest < Minitest::Test
|
||||
def setup
|
||||
GitHub::DS.reset
|
||||
end
|
||||
|
||||
def test_configures_correctly
|
||||
GitHub::DS.configure do |config|
|
||||
config.table_name = "example_key_values"
|
||||
end
|
||||
|
||||
assert_equal GitHub::DS.config.table_name, "example_key_values"
|
||||
GitHub::DS.reset
|
||||
end
|
||||
|
||||
def test_resets_correctly
|
||||
|
|
|
@ -4,6 +4,7 @@ class GitHub::KVTest < Minitest::Test
|
|||
def setup
|
||||
ActiveRecord::Base.connection.execute("TRUNCATE `key_values`")
|
||||
@kv = GitHub::KV.new { ActiveRecord::Base.connection }
|
||||
GitHub::DS.reset
|
||||
end
|
||||
|
||||
def test_initialize_without_connection
|
||||
|
|
Загрузка…
Ссылка в новой задаче