Sha256: 2add6589978c950e3e378b58ee3621c6081d986b670ab9c6a89706b47d0bfa1d
Contents?: true
Size: 676 Bytes
Versions: 59
Compression:
Stored size: 676 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../../../fixtures/constants', __FILE__) describe "Module#const_missing" do it "is called when an undefined constant is referenced via literal form" do ConstantSpecs::ClassA::CS_CONSTX.should == :CS_CONSTX end it "is called when an undefined constant is referenced via #const_get" do ConstantSpecs::ClassA.const_get(:CS_CONSTX).should == :CS_CONSTX end it "raises NameError and includes the name of the value that wasn't found" do lambda { ConstantSpecs.const_missing("HelloMissing") }.should raise_error(NameError, /ConstantSpecs::HelloMissing/) end end
Version data entries
59 entries across 59 versions & 3 rubygems