Skip to content

Commit

Permalink
modify assert_line_text method to be able to make correct assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
ono-max committed Jun 8, 2021
1 parent 269abae commit d747c12
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/support/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ def assert_line_num(expected)

def assert_line_text(expected)
@queue.push(Proc.new {
assert_block do
@internal_info['backlog'].each do |line|
line.include? expected
msg = "Expected to include #{expected} in #{@internal_info['location']}"
result = false
@internal_info['backlog'].each do |line|
if line.match? expected
result = true
break
end
end
assert_true(result, msg)
})
end

Expand Down

0 comments on commit d747c12

Please sign in to comment.