# File lib/capybara_minitest_spec.rb, line 32 def define_assertion(test_name) method_name = test_name.assertion_name MiniTest::Assertions.send :define_method, method_name do |page, *args| matcher = test_name.matcher(*args) matches = matcher.send(test_name.match_method, page) failure_message = message do matcher.send(test_name.failure_message_method) end assert matches, failure_message end end