Sha256: 55025d349cc8e71a69dac19684338a2bf13e363fec86b031c2d7b93c822f3232
Contents?: true
Size: 474 Bytes
Versions: 2
Compression:
Stored size: 474 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe Class do describe "#declared_methods" do it "returns all defined and inherited methods but not defined in the Object" do class First attr_accessor :foo def to_s; end end class Second < First attr_reader :bar end First.declared_methods.should == [:foo, :foo=, :to_s] Second.declared_methods.should == [:bar, :foo, :foo=, :to_s] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mustang-0.1.1 | spec/core_ext/class_spec.rb |
mustang-0.1.0 | spec/core_ext/class_spec.rb |