Skip to content

Factory bot deprecation warning #177

@RichardWatkins1

Description

@RichardWatkins1

From codeship logs:

DEPRECATION WARNING: Static attributes will be removed in FactoryBot 5.0. Please use dynamic
attributes instead by wrapping the attribute value in a block:

data { #<JsonStruct id="1", type="imports", attributes=#<JsonStruct status="processed", body=#<JsonStruct>, processing_errors=[]>, relationships=#<JsonStruct import=#<JsonStruct links=#<JsonStruct related="/test/v1/imports/1">>>, links=#<JsonStruct self="/test/v1/imports/1/import_entries/1">> }

To automatically update from static attributes to dynamic ones,
install rubocop-rspec and run:

rubocop \
--require rubocop-rspec \
--only FactoryBot/AttributeDefinedStatically \
--auto-correct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions