Strange minitest error when using files in test

This is quite systematic when a test use files.

For instance, I have a minitest/spec test with

Utils.compare_file(file_1, file_2).must_equal true

When the comparison gives true, no problem. When the comparison gives
false, minitest aborts with :

TypeError: superclass mismatch for class Tempfile.

_md

···

--
Posted via http://www.ruby-forum.com/.

Please file a bug

···

On Aug 28, 2013, at 3:46, Michel Demazure <lists@ruby-forum.com> wrote:

This is quite systematic when a test use files.

For instance, I have a minitest/spec test with

Utils.compare_file(file_1, file_2).must_equal true

When the comparison gives true, no problem. When the comparison gives
false, minitest aborts with :

TypeError: superclass mismatch for class Tempfile.

_md

--
Posted via http://www.ruby-forum.com/\.

Ryan Davis wrote in post #1119857:

Please file a bug

I did not find how to file a bug. Sorry.

I am running ruby-1.9.3-p429. This is a minimal example :

  describe 'Test' do
    it 'should not raise but report a failure' do
      __FILE__.size.must_equal 0
    end
  end

I get

   TypeError: superclass mismatch for class Tempfile
   C:/Ruby193/lib/ruby/1.9.1/tempfile.rb:81:in `<top (required)>'
   C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in
`require'
   C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in
`require

_md

···

--
Posted via http://www.ruby-forum.com/\.

https://rubygems.org/gems/minitest

http://docs.seattlerb.org/minitest/

% gem list -d minitest

*** LOCAL GEMS ***

minitest (5.0.6)
    Author: Ryan Davis
    Rubyforge: http://rubyforge.org/projects/bfts
    Homepage: GitHub - minitest/minitest: minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking.
    Installed at: /Library/Ruby/Gems/1.8

    minitest provides a complete suite of testing facilities supporting
    TDD, BDD, mocking, and benchmarking

···

On Aug 28, 2013, at 13:34 , Michel Demazure <lists@ruby-forum.com> wrote:

Ryan Davis wrote in post #1119857:

Please file a bug

I did not find how to file a bug. Sorry.

Ryan Davis wrote in post #1119873:

···

On Aug 28, 2013, at 13:34 , Michel Demazure <lists@ruby-forum.com> > wrote:

Ryan Davis wrote in post #1119857:

Please file a bug

I did not find how to file a bug. Sorry.

minitest | RubyGems.org | your community gem host

Thanks.
Done : Tempfile error when using files in Minitest · Issue #342 · minitest/minitest · GitHub

--
Posted via http://www.ruby-forum.com/\.

Not a minitest error. Reported as bug in RubyMine.
_md

···

--
Posted via http://www.ruby-forum.com/.

Michel Demazure wrote in post #1119909:

Not a minitest error. Reported as bug in RubyMine.

http://youtrack.jetbrains.com/issue/RUBY-14152
_md

···

--
Posted via http://www.ruby-forum.com/\.

Michel Demazure wrote in post #1119924:

Michel Demazure wrote in post #1119909:

Not a minitest error. Reported as bug in RubyMine.

http://youtrack.jetbrains.com/issue/RUBY-14152
_md

Not a minitest error, not a RubyMine error, but a ruby error :

_md

···

--
Posted via http://www.ruby-forum.com/\.