it "creates a class that can be given a name by assigning it to a constant" do
MyClass = Class.new
MyClass.name.should == "MyClass"
a = Class.new
MyClass::NestedClass = a
MyClass::NestedClass.name.should == "MyClass::NestedClass"
end
1)
Class.new creates a class that can be given a name by assigning it to a constant ERROR
Missing or uninitialized constant: MyClass
Module(Class)#const_missing at kernel/core/module.rb:687
Module#__script__ {} at ./spec/frozen/1.8/core/class/new_spec.rb:35
Kernel(Module)#instance_exec at kernel/core/kernel.rb:542
Kernel(Module)#instance_eval at kernel/core/eval.rb:130
MSpec.protect at /Users/wilson/code/rubinius/mspec/lib/mspec/runner/mspec.rb:124
RunState#protect {} at /Users/wilson/code/rubinius/mspec/lib/mspec/runner/state.rb:46
Array#each at kernel/core/array.rb:572
RunState#protect at /Users/wilson/code/rubinius/mspec/lib/mspec/runner/state.rb:46
RunState#process {} at /Users/wilson/code/rubinius/mspec/lib/mspec/runner/state.rb:64
Array#each at kernel/core/array.rb:572
RunState#process at /Users/wilson/code/rubinius/mspec/lib/mspec/runner/state.rb:68
MSpec.describe at /Users/wilson/code/rubinius/mspec/lib/mspec/runner/mspec.rb:29
Object#describe at /Users/wilson/code/rubinius/mspec/lib/mspec/runner/object.rb:11
Object#__script__ at ./spec/frozen/1.8/core/class/new_spec.rb:20
CompiledMethod#as_script at kernel/core/compiled_method.rb:359
Compile.single_load at kernel/core/compile.rb:247
Compile.unified_load {} at kernel/core/compile.rb:160
Array#each at kernel/core/array.rb:572
Compile.unified_load at kernel/core/compile.rb:126
Kernel.load at kernel/core/compile.rb:404
MSpec.files {} at /Users/wilson/code/rubinius/mspec/lib/mspec/runner/mspec.rb:45
Kernel(Module)#instance_exec at kernel/core/kernel.rb:542
Kernel(Module)#instance_eval at kernel/core/eval.rb:130
MSpec.protect at /Users/wilson/code/rubinius/mspec/lib/mspec/runner/mspec.rb:120
MSpec.files {} at /Users/wilson/code/rubinius/mspec/lib/mspec/runner/mspec.rb:46
Array#each at kernel/core/array.rb:572
MSpec.files at /Users/wilson/code/rubinius/mspec/lib/mspec/runner/mspec.rb:42
MSpec.process at /Users/wilson/code/rubinius/mspec/lib/mspec/runner/mspec.rb:35
MSpecCI#run at mspec/bin/mspec-ci:68
MSpecCI.main at /Users/wilson/code/rubinius/mspec/lib/mspec/utils/script.rb:75
Object#__script__ at mspec/bin/mspec-ci:75
CompiledMethod#as_script at kernel/core/compiled_method.rb:359
Compile.single_load at kernel/core/compile.rb:247
Compile.load_from_extension at kernel/core/compile.rb:324
Object#__script__ at kernel/loader.rb:204