shiftcommerce / flex-ruby-gem

💎 The Ruby library used to integrate with the Shift Platform API
MIT License
2 stars 0 forks source link

Factory bot deprecation warning #177

Open RichardWatkins1 opened 5 years ago

RichardWatkins1 commented 5 years ago

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