Skip to content

Commit

Permalink
Use platform specific test
Browse files Browse the repository at this point in the history
  • Loading branch information
mblumtritt committed May 30, 2024
1 parent 61d752c commit 165b419
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions spec/lib/im-lost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -408,14 +408,25 @@ def bar = :bar
thread[:var] = 41
ImLost.vars(thread.join)

expect(output).to eq <<~OUTPUT
= #{__FILE__}:#{__LINE__ - 3}
terminated Thread
> fiber-local variables
var: 21
> thread variables
result: 42
OUTPUT
if defined?(thread.native_thread_id)
expect(output).to eq <<~OUTPUT
= #{__FILE__}:#{__LINE__ - 3}
terminated Thread
> fiber-local variables
var: 21
> thread variables
result: 42
OUTPUT
else
expect(output).to eq <<~OUTPUT
= #{__FILE__}:#{__LINE__ - 3}
terminated Thread #{thread.__id__}
> fiber-local variables
var: 21
> thread variables
result: 42
OUTPUT
end
end

it 'returns given thread' do
Expand Down

0 comments on commit 165b419

Please sign in to comment.