Coder Social home page Coder Social logo

error running tests about pluginator HOT 5 OPEN

rvm avatar rvm commented on August 18, 2024
error running tests

from pluginator.

Comments (5)

mpapis avatar mpapis commented on August 18, 2024

try ruby -I lib:test test/pluginator/autodetect_test.rb

from pluginator.

logicminds avatar logicminds commented on August 18, 2024

https://github.com/rvm/pluginator/blob/master/lib/pluginator/autodetect.rb#L24

What is the purpose of doing this as I think it is causing the error above.

from pluginator.

mpapis avatar mpapis commented on August 18, 2024

For me it fixed the same problem... I do not see Autodetect being defined anywhere earlier, does it also happen on master?

from pluginator.

mpapis avatar mpapis commented on August 18, 2024

to show what problem I'm solving with it I put up this example test.rb:

test.rb 
class A ; end

# Example 1 - how it's written now, first definition, then used as namespace
class B < A ; end
class B
  class C ; end
end

# Example 2 - what happens if we require first, then define class
class D
  class E; end
end
class D < A ; end

Running it yields this:

# ruby test.rb 
test.rb:13:in `<main>': superclass mismatch for class D (TypeError)

It is necessary to define the class with inheritance before we can use it as namespace, especially if we want to use it in other file.

from pluginator.

mpapis avatar mpapis commented on August 18, 2024

can you check with #16 (https://github.com/rvm/pluginator/blob/bugfix/ensure-order-of-loading-files-in-tests/test/test_helper.rb#L71)

from pluginator.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.