::RSpec::Matchers.define :be_a_valid_doctest do |expected| match do |actual| actual.code_evaluation == actual.result_evaluation end failure_message_for_should do |actual| "expected #{actual.code_evaluation} to equal #{actual.result_evaluation}" end end