mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Fix No such file or directory tmp/cache issue in tests
This commit is contained in:
parent
4752e6723a
commit
460150fef2
@ -2,7 +2,7 @@ require 'test_helper'
|
||||
# require 'active_model/serializer/railtie'
|
||||
|
||||
class ResourceGeneratorTest < Rails::Generators::TestCase
|
||||
destination File.expand_path('../../tmp', __FILE__)
|
||||
destination File.expand_path('../../../tmp/generators', __FILE__)
|
||||
setup :prepare_destination, :copy_routes
|
||||
|
||||
tests Rails::Generators::ResourceGenerator
|
||||
|
||||
@ -2,7 +2,7 @@ require 'test_helper'
|
||||
require 'generators/serializer/serializer_generator'
|
||||
|
||||
class SerializerGeneratorTest < Rails::Generators::TestCase
|
||||
destination File.expand_path("../../tmp", __FILE__)
|
||||
destination File.expand_path("../../../tmp/generators", __FILE__)
|
||||
setup :prepare_destination
|
||||
|
||||
tests Rails::Generators::SerializerGenerator
|
||||
|
||||
@ -6,6 +6,7 @@ require 'action_controller/test_case'
|
||||
require 'action_controller/railtie'
|
||||
require 'active_support/json'
|
||||
require 'minitest/autorun'
|
||||
require 'fileutils'
|
||||
# Ensure backward compatibility with Minitest 4
|
||||
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
|
||||
|
||||
@ -21,7 +22,7 @@ class Foo < Rails::Application
|
||||
ActionController::Base.cache_store = :memory_store
|
||||
end
|
||||
end
|
||||
ActionController::Base.cache_store.clear
|
||||
FileUtils.mkdir_p(File.expand_path('../../tmp/cache', __FILE__))
|
||||
Foo.initialize!
|
||||
|
||||
require 'fixtures/poro'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user