Sha256: 766a17dd42afbbdd908faf97416a5d729e0d6888ea4eae6063bbd7746c829125
Contents?: true
Size: 459 Bytes
Versions: 106
Compression:
Stored size: 459 Bytes
Contents
require 'generator/exercise_case' class IsbnVerifierCase < Generator::ExerciseCase def workload indent_lines( [ "string = #{input.inspect}", "#{assert} IsbnVerifier.valid?(string), #{failure_message}" ], 4 ) end private def failure_message %Q("Expected #{expected}, #{reason}") end def reason "'\#{string}' #{is_or_not} a valid isbn" end def is_or_not expected ? 'is' : 'is not' end end
Version data entries
106 entries across 106 versions & 1 rubygems