spec/label_spec.rb in redistat-0.0.1 vs spec/label_spec.rb in redistat-0.0.2

- old
+ new

@@ -13,16 +13,16 @@ @label.name.should == @name @label.hash.should == Digest::SHA1.hexdigest(@name) end it "should store a label hash lookup key" do - @label.save - @label.saved?.should be_true - db.get("#{Redistat::KEY_LEBELS}#{@label.hash}").should == @name + label = Redistat::Label.new(@name, {:hashed_label => true}).save + label.saved?.should be_true + db.get("#{Redistat::KEY_LEBELS}#{label.hash}").should == @name - @name = "contact_us" - @label = Redistat::Label.create(@name) - @label.saved?.should be_true - db.get("#{Redistat::KEY_LEBELS}#{@label.hash}").should == @name + name = "contact_us" + label = Redistat::Label.create(name, {:hashed_label => true}) + label.saved?.should be_true + db.get("#{Redistat::KEY_LEBELS}#{label.hash}").should == name end end \ No newline at end of file