1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2021-10-20 21:41:46 +02:00
parent 207a5a5bc1
commit a6c6eef04a
44 changed files with 1141 additions and 250 deletions

View file

@ -74,6 +74,12 @@ describe "Module#constants" do
it "returns only public constants" do
ModuleSpecs::PrivConstModule.constants.should == [:PUBLIC_CONSTANT]
end
it "returns only constants starting with an uppercase letter" do
# e.g. fatal, IO::generic_readable and IO::generic_writable should not be returned by Module#constants
Object.constants.each { |c| c[0].should == c[0].upcase }
IO.constants.each { |c| c[0].should == c[0].upcase }
end
end
describe "Module#constants" do