Skip to content

Support for fixture output that follows directory structure #7

@tjefferson08

Description

@tjefferson08

I've got fixture files that live in a subfolder, say test/fixtures/admin/users.yml and load against the Admin::User model

I see I can use subfolders for my fixtures: test/fixtures/admin/users.rb (and FixtureBot.require them)

and therein I can write:

admin_user :cto do
  name "Bossman"
end

but the OUTPUT here is test/fixtures/admin_users.yml which (I think) looks for AdminUser and can't find Admin::User

the error that crops up is:

ActiveRecord::NotNullViolation: PG::NotNullViolation: ERROR:  null value in column "created_at" of relation "admin_users" violates not-null constraint

which goes away once I move the admin_users.yml to admin/users.yml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions