Skip to content

Instantly share code, notes, and snippets.

View gshutler's full-sized avatar
📅
👨‍💻

Garry Shutler gshutler

📅
👨‍💻
View GitHub Profile
@gshutler
gshutler / 1_readme.md
Last active December 10, 2015 11:48
Exploration of Nested Diagnostics Context (NDC) for Hatchet

Adding NDC to Hatchet

I like the idea of adding NDCs to Hatchet.

Most of the hard work could be contained within some middleware for Rack-based applications. Non-Rack applications would be responsible for calling context.clear before/after doing all the work for a context so that it was clear before new work commenced.

I'm thinking the API of the logger (accessed via the log and logger mixin methods) would be extended to include:

# Public: Returns a handle to the current logging context which
@ryanb
ryanb / expectations.md
Created December 6, 2012 01:04
Alternative expectation interface for MiniTest and RSpec

Expectations

I took the ideas presented here and built a gem called Mustard. Check it out!

There are several expectation/assertion interfaces available for writing tests/specs. Here are some issues I have with them.

Test::Unit/MiniTest

  • The order of assert_equals feels backwards
  • Oh wait, that should be assert_equal (that too)