-
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
require 'async' | ||
require 'diffy' | ||
require 'logger' | ||
|
||
RSpec.describe Diffy do | ||
def async_test_no_logfile | ||
Async do | ||
begin | ||
100.times do | ||
Diffy::Diff.new('hi there, how are?', 'hi there, how are you?').to_s(:html) | ||
end | ||
rescue => error | ||
Console.logger.error(error) | ||
pp error.backtrace | ||
end | ||
end | ||
end | ||
|
||
it "can log errors" do | ||
10.times do | ||
async_test_no_logfile | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
require 'async' | ||
require 'open3' | ||
require 'logger' | ||
|
||
RSpec.describe Open3 do | ||
it "can log errors" do | ||
2.times do | ||
Sync do | ||
Open3.popen3(["ls", "-lah"]) {|i, o, e| o.read} | ||
end | ||
end | ||
end | ||
end |