spec/subclass_spec.rb in maintain-0.2.8 vs spec/subclass_spec.rb in maintain-0.2.9

- old
+ new

@@ -2,36 +2,36 @@ require 'lib/maintain' describe Maintain do before :each do - class ::MaintainTest + class ::MaintainSubclassTest attr_accessor :existant_attribute extend Maintain end - class ::MaintainTestSubclass < ::MaintainTest; end + class ::MaintainSubclassTestSubclass < ::MaintainSubclassTest; end end it "should inherit maintainers from parent classes" do - MaintainTest.maintain :status do + MaintainSubclassTest.maintain :status do state :new state :old end - MaintainTestSubclass.maintainers[:status].should_not be_nil + MaintainSubclassTestSubclass.maintainers[:status].should_not be_nil end it "should not propagate maintainers up the class system" do - MaintainTest.maintain :status do + MaintainSubclassTest.maintain :status do state :new state :old end - MaintainTestSubclass.maintain :foo do + MaintainSubclassTestSubclass.maintain :foo do state :bar state :baz end - MaintainTest.maintainers[:foo].should be_nil - MaintainTestSubclass.maintainers[:status].should_not be_nil + MaintainSubclassTest.maintainers[:foo].should be_nil + MaintainSubclassTestSubclass.maintainers[:status].should_not be_nil end end \ No newline at end of file