Sha256: 9206fe70837f20fb75e666301cfcd26e39047c59e8e4c869b8dc5f88e670e2ef
Contents?: true
Size: 819 Bytes
Versions: 83
Compression:
Stored size: 819 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../spec_helper' module LangModuleSpec module Sub1; end end module LangModuleSpec::Sub2; end describe "module" do it "has the right name" do LangModuleSpec::Sub1.name.should == "LangModuleSpec::Sub1" LangModuleSpec::Sub2.name.should == "LangModuleSpec::Sub2" end it "gets a name when assigned to a constant" do LangModuleSpec::Anon = Module.new LangModuleSpec::Anon.name.should == "LangModuleSpec::Anon" end end describe "An anonymous module" do ruby_version_is "" ... "1.9" do it "returns an empty string for its name" do m = Module.new m.name.should == "" end end ruby_version_is "1.9" do it "returns nil for its name" do m = Module.new m.name.should == nil end end end
Version data entries
83 entries across 83 versions & 1 rubygems