Sha256: e8ddf5f66c3ba4a15c96a6c6280ec6c6854b480ad8df077fc39ad6b98b6e1981
Contents?: true
Size: 879 Bytes
Versions: 1
Compression:
Stored size: 879 Bytes
Contents
require 'bacon' require 'bacon/colored_output' class Should def enumerate(iterator, array) enum = @object.send(iterator) satisfy("##{iterator} should return an Enumerator, returns #{enum.class}") do enum.instance_of? Enumerator end values = enum.to_a satisfy("##{iterator} should yield #{array.inspect}, yields #{values.inspect}") do (values - array).empty? && (array - values).empty? end end end require 'simplecov' SimpleCov.start require 'furnace' include Furnace class RubyType < Type::Top attr_reader :ruby_type def initialize(ruby_type) @ruby_type = ruby_type end def ==(other) other.instance_of?(RubyType) && @ruby_type == other.ruby_type end def hash [self.class, @ruby_type].hash end def to_s "^#{@ruby_type}" end end class Class def to_type RubyType.new(self) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
furnace-0.4.0.beta.2 | test/helper.rb |