Sha256: 4cc22ace2872af8e27f5d5d9a0561d076db48697f65a25c85ebb0fee4e530d96
Contents?: true
Size: 576 Bytes
Versions: 3
Compression:
Stored size: 576 Bytes
Contents
require 'spec_helper' describe Heredity do class HeredityTestClass include Heredity end context "when included" do it "includes the InhertiableClassInstanceVariables module" do HeredityTestClass.should respond_to :inheritable_attributes end end describe ".on_inherit" do it "captures a block and eval's it when the class is inherited" do HeredityTestClass.on_inherit do def self.hello_world! end end class Child < HeredityTestClass end Child.should respond_to(:hello_world!) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
heredity-0.1.2 | spec/heredity_spec.rb |
heredity-0.1.1 | spec/heredity_spec.rb |
heredity-0.1.0 | spec/heredity_spec.rb |