Sha256: 2772c402ec0aa829b7a4875fce238da9cf3b300097574cebb2da6269114476c9
Contents?: true
Size: 632 Bytes
Versions: 48
Compression:
Stored size: 632 Bytes
Contents
require 'ostruct' module Generator class ExerciseCase using Generator::Underscore include CaseHelpers include Assertion attr_reader :canonical def initialize(canonical:) @canonical = canonical end def name 'test_%s' % canonical.description.underscore end def skipped(index) index.zero? ? '# skip' : 'skip' end def method_missing(sym, *args, &block) return canonical.send(sym) if canonical.respond_to?(sym) super(sym, *args, &block) end def respond_to?(sym, include_private = false) canonical.respond_to?(sym) || super end end end
Version data entries
48 entries across 48 versions & 1 rubygems