Sha256: 2a191e0eeee907aa60f756c86d30cc8a5bccfb012698e1993506cb4a8e5ad419
Contents?: true
Size: 1.29 KB
Versions: 14
Compression:
Stored size: 1.29 KB
Contents
describe "Module" do describe "reachable?" do it "should be false for an anonymous module" do Module.new.should.not.be.reachable end it "should be false for an anonymous class" do Class.new.should.not.be.reachable end it "should be true for a named module" do Kernel.should.be.reachable end it "should be true for a named class" do Object.should.be.reachable end it "should be false for a named class whose constant has gone" do class C; end c = C Object.send(:remove_const, :C) c.should.not.be.reachable end it "should be false for a named module whose constant has gone" do module M; end m = M Object.send(:remove_const, :M) m.should.not.be.reachable end it "should be false for a named class whose constant was redefined" do class C; end c = C Object.send(:remove_const, :C) class C; end C.should.be.reachable c.should.not.be.reachable end it "should be false for a named module whose constant was redefined" do module M; end m = M Object.send(:remove_const, :M) module M; end M.should.be.reachable m.should.not.be.reachable end end end
Version data entries
14 entries across 14 versions & 2 rubygems