We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9898468 + 857b4af commit 3dd5d49Copy full SHA for 3dd5d49
activerecord/test/cases/connection_adapters/schema_cache_test.rb
@@ -41,10 +41,14 @@ def test_yaml_dump_and_load
41
42
def test_cache_path_can_be_in_directory
43
cache = SchemaCache.new @connection
44
- filename = "some_dir/schema.json"
+ tmp_dir = Dir.mktmpdir
45
+ filename = File.join(tmp_dir, "schema.json")
46
+
47
+ assert_not File.exist?(filename)
48
assert cache.dump_to(filename)
49
+ assert File.exist?(filename)
50
ensure
- File.delete(filename)
51
+ FileUtils.rm_r(tmp_dir)
52
end
53
54
def test_yaml_dump_and_load_with_gzip
0 commit comments