1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00
thoughtbot--factory_bot/spec/acceptance/reload_spec.rb
Oliver Peate 7722017bc7 Adjust use_parent_strategy safely in specs
Uses a block-based helper so we can remove a global around hook.
2019-08-12 18:54:53 +01:00

10 lines
329 B
Ruby

describe "reload" do
it "does not reset the value of use_parent_strategy" do
custom_strategy = :custom_use_parent_strategy_value
with_temporary_assignment(FactoryBot, :use_parent_strategy, custom_strategy) do
FactoryBot.reload
expect(FactoryBot.use_parent_strategy).to eq custom_strategy
end
end
end