Sha256: 98d03bf5d8c7cbe27d088dc3aa64e8bc7333e387787b20511349690b16721cf9
Contents?: true
Size: 514 Bytes
Versions: 40
Compression:
Stored size: 514 Bytes
Contents
require File.join(File.expand_path(__FILE__).sub(/\/ftw\/.*/, "/testing")) require "ftw/singleton" describe FTW::Singleton do test "extending with FTW::Singleton gives a singleton method" do class Foo extend FTW::Singleton end assert_respond_to(Foo, :singleton) end test "FTW::Singleton gives a singleton instance" do class Foo extend FTW::Singleton end assert_instance_of(Foo, Foo.singleton) assert_equal(Foo.singleton.object_id, Foo.singleton.object_id) end end
Version data entries
40 entries across 40 versions & 1 rubygems