Sha256: b05e2498b9ef434b794c6713ba6c3d603fa7a56e68f22b3cc5c1f018721863f7
Contents?: true
Size: 608 Bytes
Versions: 83
Compression:
Stored size: 608 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/fixtures/classes' describe "Module#protected" do before :each do class << ModuleSpecs::Parent def protected_method_1; 5; end end end it "makes an existing class method protected" do ModuleSpecs::Parent.protected_method_1.should == 5 class << ModuleSpecs::Parent protected :protected_method_1 end lambda { ModuleSpecs::Parent.protected_method_1 }.should raise_error(NoMethodError) end end
Version data entries
83 entries across 83 versions & 1 rubygems