Giter Site home page Giter Site logo

Comments (6)

kotp avatar kotp commented on July 24, 2024

This may not be the simplest thing to do, I have noticed that the required file is not always the same as the test file... the pattern doesn't hold, for example, for the leap_year exercise. They have leap_test.rb but the required file is year, rather than leap... This makes sense for the exercise, but not for matching for automated testing.

from ruby.

kytrinyx avatar kytrinyx commented on July 24, 2024

Yeah, that's part of the reason why I haven't done it yet.

I would be OK with changing the name of the require, actually, if that would help, though it pains me a bit to have a leap.rb that defines a Year constant (another reason why I've been putting this off).

Another option would be to add a marker to the line to be replaced as a trailing comment. That would allow us to have any name for the file and still recognize it consistently.

from ruby.

kotp avatar kotp commented on July 24, 2024

Whatever the plugin says, it could be thusly done (pseudo-code):

begin
  require '_test'  
rescue LoadError
  'File not created yet, using example.rb'
  require 'example.rb'
end
class Minitest::Test
  def skip ; end
end

The last monkey patches the skip method so that all tests run. The prior makes it so that example.rb that is required anyway per the API is accounted for. The consistency is provided by example.rb

from ruby.

kytrinyx avatar kytrinyx commented on July 24, 2024

Oh, yeah, that would totally work.

from ruby.

kotp avatar kotp commented on July 24, 2024

I believe this has been effectively addressed...

from ruby.

kytrinyx avatar kytrinyx commented on July 24, 2024

Yepp. Thanks!

from ruby.

Related Issues (20)

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.