Sha256: ad495dfb68f9e92f3b3c21fdf32523d942fb70d14f1df450e63017d0f989b40a
Contents?: true
Size: 618 Bytes
Versions: 1
Compression:
Stored size: 618 Bytes
Contents
require 'coverage_helper' require 'minitest/autorun' require 'minitest/colorin' require 'pry-nav' require 'rasti-types' module Minitest class Test def as_string(value) value.is_a?(::String) ? "'#{value}'" : value.inspect end end end class Point attr_reader :x, :y def initialize(attributes={}) errors = {} if attributes.key? :x @x = attributes[:x] else errors[:x] = ['not present'] end if attributes.key? :y @y = attributes[:y] else errors[:y] = ['not present'] end raise Rasti::Types::CompoundError, errors if errors.any? end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rasti-types-1.0.0 | spec/minitest_helper.rb |