-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
Cleanup context on specs that changes it
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,13 +45,15 @@ describe Log::Context do | |
Log.context.set a: 1 | ||
Log.context.set b: 2 | ||
Log.context.should eq(c({a: 1, b: 2})) | ||
Log.context.clear | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
asterite
Member
|
||
end | ||
|
||
it "existing keys are overwritten by set" do | ||
Log.context.clear | ||
Log.context.set a: 1, b: 1 | ||
Log.context.set b: 2, c: 3 | ||
Log.context.should eq(c({a: 1, b: 2, c: 3})) | ||
Log.context.clear | ||
end | ||
|
||
it "is restored with using" do | ||
|
@@ -64,6 +66,7 @@ describe Log::Context do | |
end | ||
|
||
Log.context.should eq(c({a: 1})) | ||
Log.context.clear | ||
end | ||
|
||
it "is per fiber" do | ||
|
@@ -83,6 +86,7 @@ describe Log::Context do | |
done.send nil | ||
Log.context.should eq(c({a: 1})) | ||
done.send nil | ||
Log.context.clear | ||
end | ||
end | ||
end |
around_each
? ditto elsewhere