Add minitest gem as development dependency #179

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

michaelficarra commented Jun 19, 2012

I had to add this in order to run the tests.

This pull request passes (merged ebac2a6 into 8a9d8a1).

Owner

josh commented Jun 19, 2012

Really? Shouldn't be the case.

Contributor

michaelficarra commented Jun 19, 2012

Really.

Owner

josh commented Jun 19, 2012

Travis passes without it :)

Contributor

michaelficarra commented Jun 19, 2012

Without it installed:

$ bundle exec rake test
/usr/share/rubygems/rubygems/defaults/operating_system.rb:44: warning: method redefined; discarding old default_dir
/usr/share/rubygems/rubygems/defaults.rb:21: warning: previous definition of default_dir was here
/usr/share/rubygems/rubygems/defaults/operating_system.rb:52: warning: method redefined; discarding old default_path
/usr/share/rubygems/rubygems/defaults.rb:63: warning: previous definition of default_path was here
/usr/share/rubygems/rubygems/defaults/operating_system.rb:57: warning: method redefined; discarding old default_bindir
/usr/share/rubygems/rubygems/defaults.rb:88: warning: previous definition of default_bindir was here
/usr/share/rubygems/rubygems/defaults/operating_system.rb:65: warning: method redefined; discarding old default_ext_dir_for
/usr/share/rubygems/rubygems/defaults.rb:103: warning: previous definition of default_ext_dir_for was here
/home/michael/projects/linguist/lib/linguist/repository.rb:83: warning: assigned but unused variable - k
/home/michael/.gem/ruby/1.9.1/gems/rubypython-0.5.3/lib/rubypython/conversion.rb:47: warning: assigned but unused variable - key
/home/michael/.gem/ruby/1.9.1/gems/rubypython-0.5.3/lib/rubypython/rubypyproxy.rb:104: warning: assigned but unused variable - exc
/home/michael/.gem/ruby/1.9.1/gems/rubypython-0.5.3/lib/rubypython/operators.rb:67: warning: `*' interpreted as argument prefix
/home/michael/.gem/ruby/1.9.1/gems/rubypython-0.5.3/lib/rubypython/operators.rb:75: warning: `*' interpreted as argument prefix
/home/michael/.gem/ruby/1.9.1/gems/rubypython-0.5.3/lib/rubypython/operators.rb:86: warning: `*' interpreted as argument prefix
/home/michael/.gem/ruby/1.9.1/gems/rubypython-0.5.3/lib/rubypython/pygenerator.rb:43: warning: `*' interpreted as argument prefix
/home/michael/.gem/ruby/1.9.1/gems/pygments.rb-0.2.12/lib/pygments/ffi.rb:116: warning: private attribute?
/home/michael/.gem/ruby/1.9.1/gems/pygments.rb-0.2.12/lib/pygments/lexer.rb:39: warning: shadowing outer local variable - extname
/usr/share/ruby/test/unit.rb:3:in `require': cannot load such file -- minitest/unit (LoadError)
    from /usr/share/ruby/test/unit.rb:3:in `<top (required)>'
    from /home/michael/projects/linguist/test/test_repository.rb:3:in `require'
    from /home/michael/projects/linguist/test/test_repository.rb:3:in `<top (required)>'
    from /home/michael/.gem/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in `require'
    from /home/michael/.gem/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in <main>'
    from /home/michael/.gem/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:9:in `each'
    from /home/michael/.gem/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:9:in `block in <main>'
    from /home/michael/.gem/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `select'
    from /home/michael/.gem/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `<main>'
rake aborted!
Command failed with status (1): [/usr/bin/ruby -w -I"lib" -I"/home/michael/...]

Tasks: TOP => test
(See full trace by running task with --trace)

And on this branch:

$ git co minitest-dependency
Switched to branch 'minitest-dependency'
$ bundle exec rake test
/usr/share/rubygems/rubygems/defaults/operating_system.rb:44: warning: method redefined; discarding old default_dir
/usr/share/rubygems/rubygems/defaults.rb:21: warning: previous definition of default_dir was here
/usr/share/rubygems/rubygems/defaults/operating_system.rb:52: warning: method redefined; discarding old default_path
/usr/share/rubygems/rubygems/defaults.rb:63: warning: previous definition of default_path was here
/usr/share/rubygems/rubygems/defaults/operating_system.rb:57: warning: method redefined; discarding old default_bindir
/usr/share/rubygems/rubygems/defaults.rb:88: warning: previous definition of default_bindir was here
/usr/share/rubygems/rubygems/defaults/operating_system.rb:65: warning: method redefined; discarding old default_ext_dir_for
/usr/share/rubygems/rubygems/defaults.rb:103: warning: previous definition of default_ext_dir_for was here
/home/michael/projects/linguist/lib/linguist/repository.rb:83: warning: assigned but unused variable - k
/home/michael/.gem/ruby/1.9.1/gems/rubypython-0.5.3/lib/rubypython/conversion.rb:47: warning: assigned but unused variable - key
/home/michael/.gem/ruby/1.9.1/gems/rubypython-0.5.3/lib/rubypython/rubypyproxy.rb:104: warning: assigned but unused variable - exc
/home/michael/.gem/ruby/1.9.1/gems/rubypython-0.5.3/lib/rubypython/operators.rb:67: warning: `*' interpreted as argument prefix
/home/michael/.gem/ruby/1.9.1/gems/rubypython-0.5.3/lib/rubypython/operators.rb:75: warning: `*' interpreted as argument prefix
/home/michael/.gem/ruby/1.9.1/gems/rubypython-0.5.3/lib/rubypython/operators.rb:86: warning: `*' interpreted as argument prefix
/home/michael/.gem/ruby/1.9.1/gems/rubypython-0.5.3/lib/rubypython/pygenerator.rb:43: warning: `*' interpreted as argument prefix
/home/michael/.gem/ruby/1.9.1/gems/pygments.rb-0.2.12/lib/pygments/ffi.rb:116: warning: private attribute?
/home/michael/.gem/ruby/1.9.1/gems/pygments.rb-0.2.12/lib/pygments/lexer.rb:39: warning: shadowing outer local variable - extname
Run options: 

# Running tests:

..................................................................

Finished tests in 2.979610s, 22.1505 tests/s, 761.5090 assertions/s.

66 tests, 2269 assertions, 0 failures, 0 errors, 0 skips
$ 

Those warnings are annoying, btw.

Owner

josh commented Jun 19, 2012

Upgrade to 1.9.2+

Contributor

michaelficarra commented Jun 19, 2012

$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
$ yum list ruby
Loaded plugins: langpacks, presto, refresh-packagekit
Installed Packages
ruby.x86_64                               1.9.3.194-11.fc17                               @updates
Available Packages
ruby.i686                                 1.9.3.194-11.fc17                               updates 
$
Owner

josh commented Jun 19, 2012

Your load path says /home/michael/.gem/ruby/1.9.1

Contributor

michaelficarra commented Jun 19, 2012

Interesting. It's a fresh (2 weeks old?) Fedora 17 install. Shouldn't have anything older than 1.9.3 anywhere on the system.

Owner

josh commented Jun 19, 2012

Maybe its still using old gems. 1.9.1 had a clusterfuck of issues with miniunit vs test/unit.

1.9.3 should have miniunit as part of the standard lib with a test/unit require shim. That way things should still run on both 1.8 test/unit and 1.9 miniunit.

@josh josh closed this Jul 20, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment