Tempfile error when using files in Minitest #342

Closed
badal opened this Issue Aug 29, 2013 · 4 comments

Comments

Projects
None yet
2 participants

badal commented Aug 29, 2013

ruby-1.9.3-p429, on Windows 7
Gemfile :

 minitest (4.7.5)
    minitest-reporters (0.14.20)
      ansi
      builder
      minitest (>= 2.12, < 5.0)
      powerbar

When using a file in a test, a failure ends raising a Tempfile Error

This is a minimal exemple :

describe 'Test' do
  it 'should not raise' do
    __FILE__.size.must_equal 0
  end
end

raises :

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

Owner

zenspider commented Aug 29, 2013

Does not reproduce. Please provide all runtime details relevant to reproducing.

On Aug 29, 2013, at 0:48, Michel Demazure notifications@github.com wrote:

When using This is a minimal exemple :

describe 'Test' do
it 'should not raise' do
FILE.size.must_equal 0
end
end


Reply to this email directly or view it on GitHub.

badal commented Aug 29, 2013

After checking again, error only appears when running in RubyMine (= IntelliJ). And appears only when file is called bug_spec.rb, not when called bug_rb ! So it is a third party issue, due to some too clever trick in RubyMine.

Sorry for your lost time. Closing
_md

@badal badal closed this Aug 29, 2013

Owner

zenspider commented Aug 29, 2013

On Aug 29, 2013, at 01:17 , Michel Demazure notifications@github.com wrote:

After checking again, error only appears when running in RubyMine (= IntelliJ). And appears only when file is called bug_spec.rb, not when called bug_rb ! So it is a third party issue, due to some too clever trick in RubyMine.

Sorry for your lost time. Closing

Thanks. Please file a bug with rubymine...

@zenspider zenspider locked and limited conversation to collaborators May 17, 2017

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