Skip to content

Automatically create a database similar to Rails #18

@ilyazub

Description

@ilyazub

It'd be good to automatically set up a database similar to Rails. Rails docs.

In Rails, ActiveRecord::Tasks::DatabaseTasks.reconstruct_from_schema is called inside the ActiveSupport::Testing::Parallelization#after_fork_hook. Ref.

TODO


Originally posted by @pirj in rspec/rspec-rails#2104 (comment):

What was missing (and what Rails provides with its default testing framework):

Active Record automatically handles creating a database

Without createdb myproject2 etc it didn't work. I've seen rails db:test:prepare, but db:create wasn't apparently called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions