Skip to content

Instantly share code, notes, and snippets.

@apotonick
Last active July 5, 2017 05:54
Show Gist options
  • Select an option

  • Save apotonick/10788996 to your computer and use it in GitHub Desktop.

Select an option

Save apotonick/10788996 to your computer and use it in GitHub Desktop.
MiniTest.infect_an_assertion
MiniTest::Assertions.class_eval do
def assert_equal(subject, expected)
subject == expected
end
end
Array.infect_an_assertion :assert_hash, :must_be_hash, :do_not_flip
it do
"bla".must_be_hash 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment