-
-
Notifications
You must be signed in to change notification settings - Fork 102
[wip] Rework spec for different JRuby implementation. #611
Conversation
118c0f5
to
c114a2c
Compare
@nevinera jfyi |
tempfile.close | ||
tempfile.unlink | ||
end | ||
expect($stderr.to_io).not_to be_a(File) | ||
expect(splitter.to_io.path).not_to eq tempfile.path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I think this is a valid test for the code in StderrSplitter, I don't think it exercises the case I was trying to rely on in rspec/rspec-expectations#1460 anymore. Depending on whether we actually want to release that PR, that may be a good thing? I hadn't actually intended this PR to be merged until we had consensus on that one.
21556a5
to
582cce3
Compare
|
||
tempfile = Tempfile.new("foo") | ||
begin | ||
splitter.reopen(tempfile) | ||
expect(splitter.to_io).to be_a(File) | ||
expect(splitter.to_io).to_not be_stderr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nevinera Unless I'm mistaken this represents the same effect as what you were testing, I'm not sure if I will merge this yet but it at least works for some JRuby
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I think the part I didn't follow was the bottom method - I assumed be_stderr
was calling a stderr?
method I wasn't aware of on the stream/splitter >.<
I'm not confident about how consistent that inspect
is, but I'll trust your plan :-)
(Is that trick sturdy enough to use in here?)
cf25a08
to
43db5ab
Compare
b853a35
to
fa11ed1
Compare
No description provided.