Details

    • Type: Question Question
    • Status: Closed Closed
    • Priority: Minor - P4 Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.0
    • Component/s: None
    • Labels:
      None
    • # Replies:
      7
    • Last comment by Customer:
      false

      Description

      Hi,

      I am running test suite of BSON with minitest and Ruby 1.9.3. So when I did:

      sed -i "/gem 'test-unit'/ d" test/bson/test_helper.rb
      
      testrb -Ilib test/**/*_test.rb
      

      the test suite finished just fine:

      Finished tests in 0.317522s, 428.3172 tests/s, 982.6100 assertions/s.
      136 tests, 312 assertions, 0 failures, 0 errors, 0 skips
      

      Could you please enlighten me why are you using this hard dependency on unit-test when default Ruby's framework works just fine? This was introduced in https://github.com/mongodb/mongo-ruby-driver/commit/12e1af0c3dfcada167264faa113f2407a44f2091#test/bson/test_helper.rb

        Activity

        Hide
        Tyler Brock
        added a comment -

        Ruby 1.8.x has a different test/unit than 1.9.x. At one point I got tired of dealing with the inconsistency and said we would use the version supplied in the gem.

        Show
        Tyler Brock
        added a comment - Ruby 1.8.x has a different test/unit than 1.9.x. At one point I got tired of dealing with the inconsistency and said we would use the version supplied in the gem.
        Hide
        Vít Ondruch
        added a comment -

        Thanks for you reply. However, since it seems you are using Bundler, I believe it does not make sense to have explicit gem 'test-unit' somewhere in the code. That is already done way sooner by Bundler itself, so this is duplication IMO. Would you pleas consider to remove this line? Thank you.

        Show
        Vít Ondruch
        added a comment - Thanks for you reply. However, since it seems you are using Bundler, I believe it does not make sense to have explicit gem 'test-unit' somewhere in the code. That is already done way sooner by Bundler itself, so this is duplication IMO. Would you pleas consider to remove this line? Thank you.
        Hide
        Tyler Brock
        added a comment -

        I believe that is only done when you require 'bundler/setup' which causes numerous problems for our testing framework in that warnings get thrown all over for redefined methods.

        I can make it work with require 'bundler' and subsequent Bundler.setup(:test) and require 'test/unit' but then we are back where we started. I'd be happy to accept any and all pull requests if you can think of some thing that makes more sense.

        We like the newer test-unit provided by the gem for a couple of reasons, its faster, it has colorized output, and in general throws better errors than the included version. I think development on the internal test-unit stopped after 1.8.7 because it was replaced by minitest.

        Let me know what you think. I'm willing to do whatever you think makes sense.

        Show
        Tyler Brock
        added a comment - I believe that is only done when you require 'bundler/setup' which causes numerous problems for our testing framework in that warnings get thrown all over for redefined methods. I can make it work with require 'bundler' and subsequent Bundler.setup(:test) and require 'test/unit' but then we are back where we started. I'd be happy to accept any and all pull requests if you can think of some thing that makes more sense. We like the newer test-unit provided by the gem for a couple of reasons, its faster, it has colorized output, and in general throws better errors than the included version. I think development on the internal test-unit stopped after 1.8.7 because it was replaced by minitest. Let me know what you think. I'm willing to do whatever you think makes sense.
        Hide
        auto
        added a comment -

        Author:

        {u'date': u'2012-09-24T20:14:51-07:00', u'email': u'tyler.brock@gmail.com', u'name': u'Tyler Brock'}

        Message: RUBY-465 remove superflous test-unit
        Branch: master
        https://github.com/mongodb/mongo-ruby-driver/commit/e10d2be752e9e4dda9687e3c0867f5131059b0c0

        Show
        auto
        added a comment - Author: {u'date': u'2012-09-24T20:14:51-07:00', u'email': u'tyler.brock@gmail.com', u'name': u'Tyler Brock'} Message: RUBY-465 remove superflous test-unit Branch: master https://github.com/mongodb/mongo-ruby-driver/commit/e10d2be752e9e4dda9687e3c0867f5131059b0c0
        Hide
        Tyler Brock
        added a comment -

        The more I looked at the code, the more it bothered me. Let me know if that works for you.

        Show
        Tyler Brock
        added a comment - The more I looked at the code, the more it bothered me. Let me know if that works for you.
        Hide
        Vít Ondruch
        added a comment -

        Thank you. I like it

        Show
        Vít Ondruch
        added a comment - Thank you. I like it
        Hide
        auto
        added a comment -

        Author:

        {u'date': u'2012-09-24T20:14:51-07:00', u'email': u'tyler.brock@gmail.com', u'name': u'Tyler Brock'}

        Message: RUBY-465 remove superflous test-unit
        Branch: dev
        https://github.com/mongodb/mongo-ruby-driver/commit/e10d2be752e9e4dda9687e3c0867f5131059b0c0

        Show
        auto
        added a comment - Author: {u'date': u'2012-09-24T20:14:51-07:00', u'email': u'tyler.brock@gmail.com', u'name': u'Tyler Brock'} Message: RUBY-465 remove superflous test-unit Branch: dev https://github.com/mongodb/mongo-ruby-driver/commit/e10d2be752e9e4dda9687e3c0867f5131059b0c0

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              1 year, 29 weeks, 2 days ago
              Date of 1st Reply: