This repository was archived by the owner on Nov 30, 2024. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 101101
102102  # This spec replicates what matchers do when capturing stderr, e.g `to_stderr_from_any_process` 
103103  it  'is able to restore the stream from a cloned StdErrSplitter'  do 
104+     puts  STDERR . fileno 
105+     puts  STDERR . respond_to? ( :path )  && STDERR . path 
104106    if  RSpec ::Support ::Ruby . jruby?  && !RSpec ::Support ::Ruby . jruby_9000? 
105-       skip  "JRuby < 9.0.0.0 doesn't have a predictable identifier for stdout" 
107+       # skip "JRuby < 9.0.0.0 doesn't have a predictable identifier for stdout"
106108    end 
107109
108110    cloned  =  splitter . clone 
109111    expect ( splitter . to_io ) . to  be_stderr 
112+     puts  splitter . to_io . fileno 
110113
111114    tempfile  =  Tempfile . new ( "foo" ) 
112115    begin 
113116      splitter . reopen ( tempfile ) 
114117      expect ( splitter . to_io ) . to_not  be_stderr 
118+       puts  splitter . to_io . fileno 
115119    ensure 
116120      splitter . reopen ( cloned ) 
117121      tempfile . close 
118122      tempfile . unlink 
119123    end 
120124    # This is the important part of the test that would fail without proper cloning hygeine 
121125    expect ( splitter . to_io ) . to  be_stderr 
126+     puts  splitter . to_io . fileno 
122127  end 
123128
124129  # Detecting STDERR in a way that doesn't use a reference 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments