Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4833

Fix test failures on Ruby 3.0

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 7.3.1, 7.2.4, 7.1.9
    • Affects Version/s: None
    • Component/s: Tests
    • None

      Currently tests are failing on ruby-head which will become ruby 3.0:

      2020/01/06 18:27:35.400] An error occurred while loading ./spec/integration/associations/belongs_to_spec.rb.
      [2020/01/06 18:27:35.400] Failure/Error: delegate(*(Config.public_instance_methods(false) - [ :logger=, :logger ] << { to: Config }))
      [2020/01/06 18:27:35.400] 
      [2020/01/06 18:27:35.400] ArgumentError:
      [2020/01/06 18:27:35.400]   Delegation needs a target. Supply an options hash with a :to key as the last argument (e.g. delegate :hello, to: :greeter).
      [2020/01/06 18:27:35.400] # ./lib/mongoid.rb:112:in `<module:Mongoid>'
      [2020/01/06 18:27:35.400] # ./lib/mongoid.rb:38:in `<top (required)>'
      [2020/01/06 18:27:35.400] # ./spec/lite_spec_helper.rb:33:in `require'
      [2020/01/06 18:27:35.400] # ./spec/lite_spec_helper.rb:33:in `<top (required)>'
      [2020/01/06 18:27:35.400] # ./spec/spec_helper.rb:4:in `require'
      [2020/01/06 18:27:35.400] # ./spec/spec_helper.rb:4:in `<top (required)>'
      [2020/01/06 18:27:35.400] # ./spec/integration/associations/belongs_to_spec.rb:4:in `require'
      [2020/01/06 18:27:35.400] # ./spec/integration/associations/belongs_to_spec.rb:4:in `<top (required)>'
      [2020/01/06 18:27:35.400] An error occurred while loading ./spec/integration/associations/embedded_spec.rb.
      [2020/01/06 18:27:35.400] Failure/Error: delegate(*(Config.public_instance_methods(false) - [ :logger=, :logger ] << { to: Config }))
      

            Assignee:
            dmitry.rybakov@mongodb.com Dmitry Rybakov
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: