Giter VIP home page Giter VIP logo

Comments (17)

kerrizor avatar kerrizor commented on June 9, 2024

Related to #31 ?

from ruby.

kytrinyx avatar kytrinyx commented on June 9, 2024

Warning message was suppressed by adding gem "minitest" to my hamming_test.rb

This is likely because you already have installed minitest as a gem on your system. If you didn't have it, then adding "gem minitest" would require that you install it, and I'd rather avoid forcing people to install dependencies.

I tend to add "gem 'minitest'" manually myself (as well as "require 'minitest/pride'").

@kerrizor is right, the hamming test suite is incorrect at the moment. It's a known issue, and the correct test would probably raise an ArgumentError.

from ruby.

kotp avatar kotp commented on June 9, 2024

The timing is right for this, as we are working on the hamming exercise. Work through a solution and/or close?

from ruby.

kytrinyx avatar kytrinyx commented on June 9, 2024

The hamming part of this has been fixed (it now raises an error).

The larger question applies to all of the problems: should we explicitly require that Minitest be installed as a gem? Is it still shipped as part of Ruby, and if so, what version?

I think it's worth working through this.

I'm leaning towards explicitly adding gem 'minitest', '~> 5.0' or something similar to the problems and then making people install minitest, if it will reduce the friction/confusion around this.

from ruby.

kotp avatar kotp commented on June 9, 2024

This could be managed by using 'Bundlerand having aGemfile` in the exercises. Unsure if that is the best way to go for this project, but it is now almost the 'defacto' for Ruby projects.

from ruby.

kytrinyx avatar kytrinyx commented on June 9, 2024

If you don't have bundler, then this would be gem install bundler && bundle install, whereas if we just told you gem install minitest that would be simpler and less indirection.

from ruby.

kotp avatar kotp commented on June 9, 2024

Do we have a script that runs when you first install the exercism gem? (In other words, it could be a dependency of the gem.) A rake test task that looks at your current working directory, and tuns the required test. The infrastructure is already here, I think.

from ruby.

kytrinyx avatar kytrinyx commented on June 9, 2024

There's no exercism gem--just the binary which has no other dependencies. A rake task would be nice, but I don't think the infrastructure is in place, unless I'm thinking about this all wrong.

from ruby.

kotp avatar kotp commented on June 9, 2024

Strange. As I have this gem installed:

exercism (0.0.28)

Investigating it now.

from ruby.

kotp avatar kotp commented on June 9, 2024

Yeah... and the dependencies include both minitest and bundler...

spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "minitest", '~> 5.0'

Right now, restricted to development. The application dependencies are thus:

  spec.add_dependency "json"
  spec.add_dependency "faraday", ">= 0.8.8"
  spec.add_dependency "thor"
  spec.add_dependency "launchy", "~> 2.3.0"

from ruby.

kotp avatar kotp commented on June 9, 2024

Exercism gem has been deprecated... :) never mind.

from ruby.

kotp avatar kotp commented on June 9, 2024

This should be closed if all there is to do is notify folks to install the gem. The instruction is in the hello/-world/GETTING_STARTED.md file to do the gem install minitest which I think is sufficient.

And this does leave the 'set up an automated testing workflow' environment as a learning exercise for individual study as needed.

from ruby.

kotp avatar kotp commented on June 9, 2024

You mentioned about explicitly requiring a minimum version of Minitest? I think the new name for Minitest::Test does this automatically/naturally, to the extent that the syntax doesn't exist in an older version.

from ruby.

kytrinyx avatar kytrinyx commented on June 9, 2024

You mentioned about explicitly requiring a minimum version of Minitest?

Yeah, if people are using a version of Rails that requires minitest 4.x, then it becomes pretty complicated to get this to run without warnings.

I think adding gem install minitest to the instructions, and specifying gem 'minitest', '~>5.0' at the top of the exercise file will ensure that it runs clean.

from ruby.

kotp avatar kotp commented on June 9, 2024

Your comment has me shaving yaks this afternoon and evening. Still investigating implications. I use Bundler, so trying to simulate what people do who use neither a version manager of some kind, to include Bundler.

from ruby.

kytrinyx avatar kytrinyx commented on June 9, 2024

I hope those yaks didn't ruin your day!

from ruby.

kotp avatar kotp commented on June 9, 2024

Closing this issue as this is a "Two part" thing and the second part really has nothing to do with the hamming problem. Creating a new issue to track "explicitly require that Minitest be installed as a gem".

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.