diff --git a/lib/factory_bot_rails/factory_validator.rb b/lib/factory_bot_rails/factory_validator.rb index b40ad64..64d69aa 100644 --- a/lib/factory_bot_rails/factory_validator.rb +++ b/lib/factory_bot_rails/factory_validator.rb @@ -15,25 +15,9 @@ def run private def validate_compiled_factory - if Rails.version >= "6.0" - rails_6_0_support - else - rails_5_2_support - end - end - - def rails_6_0_support proc do |event| @validators.each { |validator| validator.validate!(event.payload) } end end - - def rails_5_2_support - proc do |*notification_event_arguments| - event = ActiveSupport::Notifications::Event.new(*notification_event_arguments) - - rails_6_0_support.call(event) - end - end end end