Skip to content

Commit

Permalink
* lib/test/unit.rb: Requires minitest < 5.0.0 if Gem is available.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
sorah committed Feb 18, 2014
1 parent 7c030a5 commit da61291
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Tue Feb 18 14:27:18 2014 Shota Fukumori <her@sorah.jp>

* lib/test/unit.rb: Requires minitest < 5.0.0 if Gem is available.

Tue Feb 18 14:24:07 2014 Shota Fukumori <her@sorah.jp>

* lib/test/unit/test-unit.gemspec: Add minitest < 5.0.0 dependency
Expand Down
1 change: 1 addition & 0 deletions lib/test/unit.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
gem 'minitest', '< 5.0.0' if defined? Gem
require 'minitest/unit'
require 'test/unit/assertions'
require 'test/unit/testcase'
Expand Down

6 comments on commit da61291

@marcandre
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid this will create regressions for anyone using bundler.

For example, create an empty Gemfile and try bundle exec ruby -e "require 'test/unit'"

You get an error:

.rvm/gems/ruby-head@global/gems/bundler-1.5.3/lib/bundler/rubygems_integration.rb:240:in `block in replace_gem': minitest is not part of the bundle. Add it to Gemfile. (Gem::LoadError)

@marcandre
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sorah Would you like me to create an issue on bugs.ruby-lang.org?

@sorah
Copy link
Member Author

@sorah sorah commented on da61291 Mar 21, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops.

Should I add && !defined?(Bundler) too? The problem was this test/unit doesn't work on environment which have minitest 5+...

@sorah
Copy link
Member Author

@sorah sorah commented on da61291 Mar 21, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcandre Thank you, could you file a ticket?

@comjf
Copy link

@comjf comjf commented on da61291 Mar 24, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a current work around for this?

@sorah
Copy link
Member Author

@sorah sorah commented on da61291 Mar 26, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add gem 'minitest', '< 5.0.0' to your Gemfile

Please sign in to comment.