set #scope rather than #class_name as the preferred method for setting the scope value within a Redistat::Model

This commit is contained in:
2011-03-16 00:56:59 +00:00
parent a983e554c6
commit 2e2d3273cc
3 changed files with 6 additions and 6 deletions

View File

@@ -25,6 +25,6 @@ end
class ModelHelper4
include Redistat::Model
class_name "FancyHelper"
scope "FancyHelper"
end

View File

@@ -37,7 +37,7 @@ describe Redistat::Model do
ModelHelper2.depth.should == :day
ModelHelper2.store_event.should == true
ModelHelper2.hashed_label.should == true
ModelHelper2.class_name.should be_nil
ModelHelper2.scope.should be_nil
ModelHelper1.depth.should == nil
ModelHelper1.store_event.should == nil
@@ -55,7 +55,7 @@ describe Redistat::Model do
ModelHelper1.store_event.should == nil
ModelHelper1.hashed_label.should == nil
ModelHelper4.class_name.should == "FancyHelper"
ModelHelper4.scope.should == "FancyHelper"
ModelHelper4.send(:name).should == "FancyHelper"
end