Sha256: 467372acab983bee3f07c6165021dba9fb8c717a7568e28bda75a0d5b6e032ee
Contents?: true
Size: 603 Bytes
Versions: 83
Compression:
Stored size: 603 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' describe "Precision.included" do it "raises a TypeError when a class mixed with Precision does not specify induced_from" do class Foo ;include Precision ;end lambda { Foo.induced_from(1) }.should raise_error(TypeError) end it "doesn't raise a TypeError when a class mixed with Precision specifies induced_from" do class Foo include Precision def self.induced_from(obj) # nothing end end lambda { Foo.induced_from(1) }.should_not raise_error(TypeError) end end
Version data entries
83 entries across 83 versions & 1 rubygems