spec/toy/persistence_spec.rb in toystore-0.5 vs spec/toy/persistence_spec.rb in toystore-0.6

- old
+ new

@@ -71,30 +71,16 @@ klass.has_cache?.should be_false end end describe ".store_key" do - it "returns namespace and id" do + it "returns id" do doc = User.new - - User.store_key(doc.id).should == "User:#{doc.id}" - User.namespace('Crazy') - User.store_key(doc.id).should == "Crazy:#{doc.id}" + User.store_key(doc.id).should == doc.id end end - describe ".namespace" do - it "defaults to class name" do - User.namespace.should == 'User' - end - - it "sets if argument and reads if not" do - User.namespace('CrazyUser') - User.namespace.should == 'CrazyUser' - end - end - describe ".create" do before do User.attribute :name, String User.attribute :age, Integer @doc = User.create(:name => 'John', :age => 50) @@ -165,12 +151,12 @@ User.new.store.should equal(User.store) end end describe "#store_key" do - it "returns pluralized human name and id" do + it "returns id" do doc = User.new - doc.store_key.should == "User:#{doc.id}" + doc.store_key.should == doc.id end end describe "#new_record?" do it "returns true if new" do \ No newline at end of file